Skip to content

Commit 3b61f44

Browse files
Merge branch 'main' into template
# Conflicts: # docs/release_notes.md
2 parents 2b41897 + f16f625 commit 3b61f44

File tree

109 files changed

+98
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+98
-212
lines changed

.github/workflows/continuous-integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ jobs:
7272
7373
- name: "Slack Notification"
7474
if: ${{ github.ref == 'refs/heads/main' && failure() }}
75-
uses: slackapi/slack-github-action@v2.0.0
75+
uses: slackapi/slack-github-action@v2.1.0
7676
with:
7777
webhook: ${{ secrets.SLACK_WEBHOOK }}
7878
webhook-type: incoming-webhook

.github/workflows/deploy-snapshot.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040

4141
- name: "Slack Notification"
4242
if: failure()
43-
uses: slackapi/slack-github-action@v2.0.0
43+
uses: slackapi/slack-github-action@v2.1.0
4444
with:
4545
webhook: ${{ secrets.SLACK_WEBHOOK }}
4646
webhook-type: incoming-webhook

.github/workflows/e2e-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969

7070
- name: "Slack Notification"
7171
if: failure()
72-
uses: slackapi/slack-github-action@v2.0.0
72+
uses: slackapi/slack-github-action@v2.1.0
7373
with:
7474
webhook: ${{ secrets.SLACK_WEBHOOK }}
7575
webhook-type: incoming-webhook

.github/workflows/fosstars-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676

7777
- name: "Slack Notification"
7878
if: failure()
79-
uses: slackapi/slack-github-action@v2.0.0
79+
uses: slackapi/slack-github-action@v2.1.0
8080
with:
8181
webhook: ${{ secrets.SLACK_WEBHOOK }}
8282
webhook-type: incoming-webhook

docs/release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
### 🔧 Compatibility Notes
1010

11+
- The old OpenAI client (v1.0.0) is being deprecated in favor of the new OpenAI client (v1.4.0).
12+
[See the documentation for more details](https://sap.github.io/ai-sdk/docs/java/foundation-models/openai/chat-completion)
1113
- [Orchestration] `OrchestrationTemplate.withTemplate()` has been deprecated. Please use `OrchestrationTemplate.withTemplateMessages()` instead.
1214

1315
### ✨ New Functionality

foundation-models/openai/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@
157157
<artifactId>openapi-generator-maven-plugin</artifactId>
158158
<configuration>
159159
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
160-
<apiMaturity>beta</apiMaturity>
161160
<enableOneOfAnyOfGeneration>true</enableOneOfAnyOfGeneration>
162161
<compileScope>COMPILE</compileScope>
163162
<deleteOutputDirectory>true</deleteOutputDirectory>

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/OpenAiClient.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ public static OpenAiClient withCustomDestination(@Nonnull final Destination dest
112112
}
113113

114114
/**
115-
* Use this method to set a system prompt that should be used across multiple chat completions
116-
* with basic string prompts {@link #streamChatCompletionDeltas(OpenAiChatCompletionParameters)}.
115+
* Add a system prompt before user prompts.
117116
*
118117
* <p>Note: The system prompt is ignored on chat completions invoked with
119118
* OpenAiChatCompletionPrompt.
@@ -133,8 +132,10 @@ public OpenAiClient withSystemPrompt(@Nonnull final String systemPrompt) {
133132
* @param prompt a text message.
134133
* @return the completion output
135134
* @throws OpenAiClientException if the request fails
135+
* @deprecated Use {@link #chatCompletion(OpenAiChatCompletionRequest)} instead.
136136
*/
137137
@Nonnull
138+
@Deprecated
138139
public OpenAiChatCompletionOutput chatCompletion(@Nonnull final String prompt)
139140
throws OpenAiClientException {
140141
final OpenAiChatCompletionParameters parameters = new OpenAiChatCompletionParameters();
@@ -183,8 +184,10 @@ public CreateChatCompletionResponse chatCompletion(
183184
* @param parameters the completion request.
184185
* @return the completion output
185186
* @throws OpenAiClientException if the request fails
187+
* @deprecated Use {@link #chatCompletion(OpenAiChatCompletionRequest)} instead.
186188
*/
187189
@Nonnull
190+
@Deprecated
188191
public OpenAiChatCompletionOutput chatCompletion(
189192
@Nonnull final OpenAiChatCompletionParameters parameters) throws OpenAiClientException {
190193
warnIfUnsupportedUsage();
@@ -321,8 +324,10 @@ public Stream<OpenAiChatCompletionDelta> streamChatCompletionDeltas(
321324
* @param parameters The prompt, including a list of messages.
322325
* @return A stream of message deltas
323326
* @throws OpenAiClientException if the request fails or if the finish reason is content_filter
327+
* @deprecated Use {@link #streamChatCompletionDeltas(OpenAiChatCompletionRequest)} instead.
324328
*/
325329
@Nonnull
330+
@Deprecated
326331
public Stream<com.sap.ai.sdk.foundationmodels.openai.model.OpenAiChatCompletionDelta>
327332
streamChatCompletionDeltas(@Nonnull final OpenAiChatCompletionParameters parameters)
328333
throws OpenAiClientException {
@@ -383,6 +388,7 @@ public EmbeddingsCreate200Response embedding(@Nonnull final EmbeddingsCreateRequ
383388
* @throws OpenAiClientException if the request fails
384389
*/
385390
@Nonnull
391+
@Deprecated
386392
public OpenAiEmbeddingOutput embedding(@Nonnull final OpenAiEmbeddingParameters parameters)
387393
throws OpenAiClientException {
388394
return execute("/embeddings", parameters, OpenAiEmbeddingOutput.class);

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/generated/model/ChatCompletionFunctionCall.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import com.fasterxml.jackson.annotation.JsonAnySetter;
1616
import com.fasterxml.jackson.annotation.JsonIgnore;
1717
import com.fasterxml.jackson.annotation.JsonProperty;
18-
import com.google.common.annotations.Beta;
1918
import java.util.LinkedHashMap;
2019
import java.util.Map;
2120
import java.util.NoSuchElementException;
@@ -28,7 +27,7 @@
2827
* Deprecated and replaced by &#x60;tool_calls&#x60;. The name and arguments of a function that
2928
* should be called, as generated by the model.
3029
*/
31-
@Beta // CHECKSTYLE:OFF
30+
// CHECKSTYLE:OFF
3231
public class ChatCompletionFunctionCall
3332
// CHECKSTYLE:ON
3433
{

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/generated/model/ChatCompletionFunctionCallOption.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import com.fasterxml.jackson.annotation.JsonAnySetter;
1616
import com.fasterxml.jackson.annotation.JsonIgnore;
1717
import com.fasterxml.jackson.annotation.JsonProperty;
18-
import com.google.common.annotations.Beta;
1918
import java.util.LinkedHashMap;
2019
import java.util.Map;
2120
import java.util.NoSuchElementException;
@@ -28,7 +27,7 @@
2827
* Specifying a particular function via &#x60;{\&quot;name\&quot;: \&quot;my_function\&quot;}&#x60;
2928
* forces the model to call that function.
3029
*/
31-
@Beta // CHECKSTYLE:OFF
30+
// CHECKSTYLE:OFF
3231
public class ChatCompletionFunctionCallOption
3332
// CHECKSTYLE:ON
3433
{

foundation-models/openai/src/main/java/com/sap/ai/sdk/foundationmodels/openai/generated/model/ChatCompletionFunctions.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import com.fasterxml.jackson.annotation.JsonAnySetter;
1616
import com.fasterxml.jackson.annotation.JsonIgnore;
1717
import com.fasterxml.jackson.annotation.JsonProperty;
18-
import com.google.common.annotations.Beta;
1918
import java.util.HashMap;
2019
import java.util.LinkedHashMap;
2120
import java.util.Map;
@@ -31,7 +30,7 @@
3130
* @deprecated
3231
*/
3332
@Deprecated
34-
@Beta // CHECKSTYLE:OFF
33+
// CHECKSTYLE:OFF
3534
public class ChatCompletionFunctions
3635
// CHECKSTYLE:ON
3736
{

0 commit comments

Comments
 (0)