Skip to content

Commit 8f3b16e

Browse files
committed
Merge branch 'main' into feat/orchestration/embedding-conv
2 parents 3e6a562 + 1d31bc2 commit 8f3b16e

32 files changed

+471
-493
lines changed

.github/workflows/spec-update.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,6 @@ jobs:
5959
java-version: ${{ env.JAVA_VERSION }}
6060
cache: 'maven'
6161

62-
- name: "Install Baseline SDK Version"
63-
# this is needed as otherwise "process sources" will fail on e.g. orchestration module, if the core module isn't in the maven cache
64-
run: |
65-
mvn install -DskipTests
66-
6762
- name: "Checkout or Create Branch"
6863
id: branch
6964
# Checkout branch if it exists, otherwise create it
@@ -110,6 +105,11 @@ jobs:
110105
echo "spec_diff=false" >> "$GITHUB_OUTPUT"
111106
fi
112107
108+
- name: "Install Baseline SDK Version"
109+
# this is needed as otherwise "process sources" will fail on e.g. orchestration module, if the core module isn't in the maven cache
110+
run: |
111+
mvn install -DskipTests
112+
113113
- name: "Generate"
114114
id: generate
115115
if: steps.spec_diff.outputs.spec_diff == 'true'

.github/workflows/weekly-spec-update.yaml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,59 @@ jobs:
88
update-all-specs:
99
runs-on: ubuntu-latest
1010
permissions:
11-
contents: write
12-
pull-requests: write
11+
actions: write
1312

1413
strategy:
1514
matrix:
1615
file:
1716
- core
1817
- document-grounding
1918
- prompt-registry
19+
- orchestration
2020

2121
steps:
2222
- name: "Checkout repository"
2323
uses: actions/checkout@v4
2424

25+
- name: "Get orchestration version"
26+
if: matrix.file == 'orchestration'
27+
run: |
28+
ORCH_VERSION=$(curl --silent --request GET --url "https://github.tools.sap/api/v3/repos/MLF-prod/mlf-gitops-prod/contents/services/llm-orchestration/source/Chart.yaml?ref=aws.eu-central-1.prod-eu/current" -H "Authorization: Bearer $TOKEN" -H "Accept: application/vnd.github.v3.raw" | grep 'version:' | awk '{print $2}')
29+
30+
if [ -z "$ORCH_VERSION" ]; then
31+
echo "Failed to fetch orchestration version"
32+
exit 1
33+
fi
34+
echo "Orchestration version: $ORCH_VERSION"
35+
echo "ORCH_VERSION=$ORCH_VERSION" >> $GITHUB_ENV
36+
env:
37+
TOKEN: ${{ secrets.GH_TOOLS_TOKEN }}
38+
39+
2540
- name: "Trigger spec update"
2641
run: |
42+
BRANCH="main"
43+
if [ "${{ matrix.file }}" = "orchestration" ]; then
44+
BRANCH="rel/$ORCH_VERSION"
45+
fi
46+
echo "Using branch: $BRANCH"
47+
2748
gh workflow run spec-update.yaml \
2849
--field file=${{ matrix.file }} \
29-
--field file-ref=main \
50+
--field file-ref=$BRANCH \
3051
--field create-pr=true
3152
env:
3253
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
55+
- name: "Slack Notification"
56+
if: failure()
57+
uses: slackapi/[email protected]
58+
with:
59+
webhook: ${{ secrets.SLACK_WEBHOOK }}
60+
webhook-type: incoming-webhook
61+
payload: |
62+
blocks:
63+
- type: "section"
64+
text:
65+
type: "mrkdwn"
66+
text: "⚠️ Weekly spec update failed! 😬 Please inspect & fix by clicking <https://github.com/SAP/ai-sdk-java/actions/runs/${{ github.run_id }}|here>"

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

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

33
import static lombok.AccessLevel.PACKAGE;
44

5-
import com.google.common.annotations.Beta;
65
import com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionMessageToolCall;
76
import com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionMessageToolCallFunction;
87
import com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionRequestAssistantMessage;
@@ -25,7 +24,6 @@
2524
*
2625
* @since 1.4.0
2726
*/
28-
@Beta
2927
@Value
3028
@Accessors(fluent = true)
3129
@AllArgsConstructor(access = PACKAGE)
@@ -39,18 +37,14 @@ public class OpenAiAssistantMessage implements OpenAiMessage {
3937
*
4038
* <p>May contain an empty list of {@link OpenAiContentItem} when tool calls are present.
4139
*/
42-
@Getter(onMethod_ = @Beta)
43-
@Nonnull
44-
OpenAiMessageContent content;
40+
@Getter @Nonnull OpenAiMessageContent content;
4541

4642
/**
4743
* The tool calls associated with this message if present.
4844
*
4945
* @since 1.6.0
5046
*/
51-
@Getter(onMethod_ = @Beta)
52-
@Nonnull
53-
List<OpenAiToolCall> toolCalls;
47+
@Getter @Nonnull List<OpenAiToolCall> toolCalls;
5448

5549
/**
5650
* Creates a new assistant message with the given single message as text content.

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import static lombok.AccessLevel.PACKAGE;
55

66
import com.fasterxml.jackson.annotation.JsonCreator;
7-
import com.google.common.annotations.Beta;
87
import com.sap.ai.sdk.core.common.StreamedDelta;
98
import com.sap.ai.sdk.foundationmodels.openai.generated.model.CompletionUsage;
109
import com.sap.ai.sdk.foundationmodels.openai.generated.model.CreateChatCompletionStreamResponse;
@@ -22,7 +21,6 @@
2221
*
2322
* @since 1.4.0
2423
*/
25-
@Beta
2624
@RequiredArgsConstructor(onConstructor_ = @JsonCreator, access = PACKAGE)
2725
@Getter
2826
@ToString

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.sap.ai.sdk.foundationmodels.openai;
22

3-
import com.google.common.annotations.Beta;
43
import com.google.common.collect.Lists;
54
import com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionStreamOptions;
65
import com.sap.ai.sdk.foundationmodels.openai.generated.model.ChatCompletionTool;
@@ -30,7 +29,6 @@
3029
* API Reference</a>
3130
* @since 1.4.0
3231
*/
33-
@Beta
3432
@Value
3533
@With
3634
@AllArgsConstructor(access = AccessLevel.PRIVATE)

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import static lombok.AccessLevel.NONE;
55
import static lombok.AccessLevel.PACKAGE;
66

7-
import com.google.common.annotations.Beta;
87
import com.sap.ai.sdk.foundationmodels.openai.generated.model.CompletionUsage;
98
import com.sap.ai.sdk.foundationmodels.openai.generated.model.CreateChatCompletionResponse;
109
import com.sap.ai.sdk.foundationmodels.openai.generated.model.CreateChatCompletionResponseChoicesInner;
@@ -21,7 +20,6 @@
2120
*
2221
* @since 1.4.0
2322
*/
24-
@Beta
2523
@Value
2624
@RequiredArgsConstructor(access = PACKAGE)
2725
@Setter(value = NONE)

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

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ public OpenAiClient withApiVersion(@Nonnull final String apiVersion) {
101101
* @see AiCoreService#getInferenceDestination(String)
102102
* @return a new OpenAI client.
103103
*/
104-
@Beta
105104
@Nonnull
106105
public static OpenAiClient withCustomDestination(@Nonnull final Destination destination) {
107106
final OpenAiClient client = new OpenAiClient(destination);
@@ -156,7 +155,6 @@ public OpenAiChatCompletionOutput chatCompletion(@Nonnull final String prompt)
156155
* @throws OpenAiClientException if the request fails
157156
* @since 1.4.0
158157
*/
159-
@Beta
160158
@Nonnull
161159
public OpenAiChatCompletionResponse chatCompletion(
162160
@Nonnull final OpenAiChatCompletionRequest request) throws OpenAiClientException {
@@ -173,7 +171,6 @@ public OpenAiChatCompletionResponse chatCompletion(
173171
* @throws OpenAiClientException if the request fails
174172
* @since 1.4.0
175173
*/
176-
@Beta
177174
@Nonnull
178175
public CreateChatCompletionResponse chatCompletion(
179176
@Nonnull final CreateChatCompletionRequest request) throws OpenAiClientException {
@@ -274,7 +271,6 @@ private static void throwOnContentFilter(@Nonnull final OpenAiChatCompletionDelt
274271
* @see #streamChatCompletion(String)
275272
* @since 1.4.0
276273
*/
277-
@Beta
278274
@Nonnull
279275
public Stream<OpenAiChatCompletionDelta> streamChatCompletionDeltas(
280276
@Nonnull final OpenAiChatCompletionRequest request) throws OpenAiClientException {
@@ -291,7 +287,6 @@ public Stream<OpenAiChatCompletionDelta> streamChatCompletionDeltas(
291287
* @see #streamChatCompletionDeltas(OpenAiChatCompletionRequest) for a higher-level API
292288
* @since 1.4.0
293289
*/
294-
@Beta
295290
@Nonnull
296291
public Stream<OpenAiChatCompletionDelta> streamChatCompletionDeltas(
297292
@Nonnull final CreateChatCompletionRequest request) throws OpenAiClientException {
@@ -358,7 +353,6 @@ private void warnIfUnsupportedUsage() {
358353
* @see #embedding(EmbeddingsCreateRequest) for full confgurability.
359354
* @since 1.4.0
360355
*/
361-
@Beta
362356
@Nonnull
363357
public OpenAiEmbeddingResponse embedding(@Nonnull final OpenAiEmbeddingRequest request)
364358
throws OpenAiClientException {
@@ -374,7 +368,6 @@ public OpenAiEmbeddingResponse embedding(@Nonnull final OpenAiEmbeddingRequest r
374368
* @see #embedding(OpenAiEmbeddingRequest) for conveninece api
375369
* @since 1.4.0
376370
*/
377-
@Beta
378371
@Nonnull
379372
public EmbeddingsCreate200Response embedding(@Nonnull final EmbeddingsCreateRequest request)
380373
throws OpenAiClientException {
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
package com.sap.ai.sdk.foundationmodels.openai;
22

3-
import com.google.common.annotations.Beta;
4-
53
/**
64
* Represents an item in a {@link OpenAiMessageContent} object.
75
*
86
* @since 1.4.0
97
*/
10-
@Beta
118
public sealed interface OpenAiContentItem permits OpenAiTextItem, OpenAiImageItem {}

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package com.sap.ai.sdk.foundationmodels.openai;
22

3-
import com.google.common.annotations.Beta;
43
import com.sap.ai.sdk.foundationmodels.openai.generated.model.EmbeddingsCreateRequest;
54
import com.sap.ai.sdk.foundationmodels.openai.generated.model.EmbeddingsCreateRequestInput;
65
import java.util.Collections;
@@ -16,11 +15,10 @@
1615
*
1716
* @since 1.4.0
1817
*/
19-
@Beta
2018
@Value
2119
public class OpenAiEmbeddingRequest {
2220
/** List of tokens to be embedded. */
23-
@Nonnull private final List<String> tokens;
21+
@Nonnull List<String> tokens;
2422

2523
/**
2624
* Constructs an OpenAiEmbeddingRequest from a list of strings.

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import static lombok.AccessLevel.NONE;
44
import static lombok.AccessLevel.PACKAGE;
55

6-
import com.google.common.annotations.Beta;
76
import com.sap.ai.sdk.foundationmodels.openai.generated.model.EmbeddingsCreate200Response;
87
import java.util.ArrayList;
98
import java.util.List;
@@ -20,7 +19,6 @@
2019
*
2120
* @since 1.4.0
2221
*/
23-
@Beta
2422
@Value
2523
@AllArgsConstructor(access = PACKAGE)
2624
@Setter(value = NONE)

0 commit comments

Comments
 (0)