Skip to content

Commit f7c6d69

Browse files
authored
Merge branch 'main' into feat/spring-ai-ga-release
2 parents dd1366c + 45a52ab commit f7c6d69

File tree

13 files changed

+58
-50
lines changed

13 files changed

+58
-50
lines changed

core-services/document-grounding/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.sap.ai.sdk</groupId>
66
<artifactId>sdk-parent</artifactId>
7-
<version>1.9.0-SNAPSHOT</version>
7+
<version>1.10.0-SNAPSHOT</version>
88
<relativePath>../../pom.xml</relativePath>
99
</parent>
1010
<artifactId>document-grounding</artifactId>
@@ -30,6 +30,11 @@
3030
<organizationUrl>https://www.sap.com</organizationUrl>
3131
</developer>
3232
</developers>
33+
<scm>
34+
<connection>scm:git:git://github.com/SAP/ai-sdk-java.git</connection>
35+
<developerConnection>scm:git:ssh://github.com:SAP/ai-sdk-java.git</developerConnection>
36+
<url>https://github.com/SAP/ai-sdk-java/tree/main</url>
37+
</scm>
3338
<properties>
3439
<project.rootdir>${project.basedir}/../../</project.rootdir>
3540
<coverage.complexity>80%</coverage.complexity>

core-services/prompt-registry/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.sap.ai.sdk</groupId>
66
<artifactId>sdk-parent</artifactId>
7-
<version>1.9.0-SNAPSHOT</version>
7+
<version>1.10.0-SNAPSHOT</version>
88
<relativePath>../../pom.xml</relativePath>
99
</parent>
1010
<artifactId>prompt-registry</artifactId>
@@ -31,6 +31,11 @@
3131
<organizationUrl>https://www.sap.com</organizationUrl>
3232
</developer>
3333
</developers>
34+
<scm>
35+
<connection>scm:git:git://github.com/SAP/ai-sdk-java.git</connection>
36+
<developerConnection>scm:git:ssh://github.com:SAP/ai-sdk-java.git</developerConnection>
37+
<url>https://github.com/SAP/ai-sdk-java/tree/main</url>
38+
</scm>
3439
<properties>
3540
<project.rootdir>${project.basedir}/../../</project.rootdir>
3641
<coverage.complexity>75%</coverage.complexity>

core/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.sap.ai.sdk</groupId>
66
<artifactId>sdk-parent</artifactId>
7-
<version>1.9.0-SNAPSHOT</version>
7+
<version>1.10.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>core</artifactId>
1010
<name>AI Core client</name>
@@ -28,6 +28,11 @@
2828
<organizationUrl>https://www.sap.com</organizationUrl>
2929
</developer>
3030
</developers>
31+
<scm>
32+
<connection>scm:git:git://github.com/SAP/ai-sdk-java.git</connection>
33+
<developerConnection>scm:git:ssh://github.com:SAP/ai-sdk-java.git</developerConnection>
34+
<url>https://github.com/SAP/ai-sdk-java/tree/main</url>
35+
</scm>
3136
<properties>
3237
<project.rootdir>${project.basedir}/../</project.rootdir>
3338
<coverage.complexity>64%</coverage.complexity>

core/src/main/java/com/sap/ai/sdk/core/common/ClientResponseHandler.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,10 @@ private T parseResponse(@Nonnull final ClassicHttpResponse response) throws E {
7878
throw exceptionConstructor.apply("Response was empty.", null);
7979
}
8080
val content = getContent(responseEntity);
81-
log.debug("Parsing response from JSON response: {}", content);
8281
try {
8382
return objectMapper.readValue(content, responseType);
8483
} catch (final JsonProcessingException e) {
85-
log.error("Failed to parse the following response: {}", content);
84+
log.error("Failed to parse response to type {}", responseType);
8685
throw exceptionConstructor.apply("Failed to parse response", e);
8786
}
8887
}
@@ -92,7 +91,7 @@ private String getContent(@Nonnull final HttpEntity entity) {
9291
try {
9392
return EntityUtils.toString(entity, StandardCharsets.UTF_8);
9493
} catch (IOException | ParseException e) {
95-
throw exceptionConstructor.apply("Failed to read response content.", e);
94+
throw exceptionConstructor.apply("Failed to read response content", e);
9695
}
9796
}
9897

@@ -122,7 +121,10 @@ public void buildExceptionAndThrow(@Nonnull final ClassicHttpResponse response)
122121
throw exception;
123122
}
124123

125-
log.error("The service responded with an HTTP error and the following content: {}", content);
124+
log.error(
125+
"The service responded with an HTTP {} ({})",
126+
response.getCode(),
127+
response.getReasonPhrase());
126128
val contentType = ContentType.parse(entity.getContentType());
127129
if (!ContentType.APPLICATION_JSON.isSameMimeType(contentType)) {
128130
throw exception;

core/src/main/java/com/sap/ai/sdk/core/common/ClientStreamingHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ public Stream<D> handleStreamingResponse(@Nonnull final ClassicHttpResponse resp
7777
try {
7878
return objectMapper.readValue(data, responseType);
7979
} catch (final IOException e) { // exception message e gets lost
80-
log.error("Failed to parse the following response: {}", line);
81-
throw exceptionConstructor.apply("Failed to parse delta message: " + line, e);
80+
log.error("Failed to parse delta chunk to type {}", responseType);
81+
throw exceptionConstructor.apply("Failed to parse delta chunk", e);
8282
}
8383
});
8484
}

core/src/main/java/com/sap/ai/sdk/core/common/IterableStreamConverter.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public boolean hasNext() {
7070
} catch (final Exception e) {
7171
isDone = true;
7272
stopHandler.run();
73-
log.debug("Error while reading next element.", e);
73+
log.debug("Reading next element failed with error {})", e.getClass().getSimpleName());
7474
throw errorHandler.apply(e);
7575
}
7676
return !isDone;
@@ -114,7 +114,13 @@ static Stream<String> lines(
114114

115115
final var reader = new BufferedReader(new InputStreamReader(inputStream, UTF_8), BUFFER_SIZE);
116116
final Runnable closeHandler =
117-
() -> Try.run(reader::close).onFailure(e -> log.error("Could not close input stream", e));
117+
() ->
118+
Try.run(reader::close)
119+
.onFailure(
120+
e ->
121+
log.debug(
122+
"Could not close input stream with error: {} (ignored)",
123+
e.getClass().getSimpleName()));
118124
final Function<Exception, RuntimeException> errHandler =
119125
e -> exceptionType.apply("Parsing response content was interrupted.", e);
120126

docs/release_notes.md

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,16 @@
1212
- The `OrchestrationChatOptions` have been, replacing all references to `FunctionCallback` with `ToolCallback`.
1313
- Please follow the [official Spring AI upgrade guide](https://docs.spring.io/spring-ai/reference/upgrade-notes.html#upgrading-to-1-0-0-RC1) for further details.
1414
- The `@Beta` annotations on all classes related to Spring AI have been removed.
15-
- The old OpenAI client (v1.0.0) is being deprecated in favor of the new OpenAI client (v1.4.0).
16-
[See the documentation for more details](https://sap.github.io/ai-sdk/docs/java/foundation-models/openai/chat-completion)
17-
- Generated classes for the following service specifications are subject to change:
18-
- core
19-
- openai
20-
- orchestration
21-
- document grounding
22-
23-
- [Orchestration] Interfaces with only one implementation were reduced.
24-
- As a result, the accessors for fields `OrchestrationModuleConfig.inputTranslationConfig` and `OrchestrationModuleConfig.outputTranslationConfig` now handle the implementing class explicitly.
25-
- The same applies to helper methods `DpiMasking#createConfig()` and `MaskingProvider#createConfig()`.
26-
- [Orchestration] `OrchestrationTemplate.withTemplate()` has been deprecated. Please use `OrchestrationTemplate.withTemplateMessages()` instead.
27-
- [Orchestration] The method `createConfig()` is removed from `ContentFilter`, `AzureContentFilter` and `LlamaGuardFilter` and is replaced by `createInputFilterConfig()` and `createOutputFilterConfig()`.
28-
- [Orchestration] Deprecated : `LLAMA3_1_70B_INSTRUCT`, `CLAUDE_3_SONNET`, `TITAN_TEXT_LITE`, `TITAN_TEXT_EXPRESS`, `GPT_4`, `GPT_4_0613`, `MIXTRAL_8X7B_INSTRUCT_V01`.
29-
- `GPT_4` and `GPT_4_0613` are replaced by : `GPT_40`or `GPT_41`.
30-
- `CLAUDE_3_SONNET` is replaced by `CLAUDE_4_SONNET`.
31-
- `MIXTRAL_8X7B_INSTRUCT_V01` is replaced by `MISTRAL_SMALL_INSTRUCT`.
32-
- [OpenAI] Deprecated : `GPT_4`.
33-
- `GPT_4`is replaced by : `GPT_40`or `GPT_41`.
34-
35-
- [Prompt Registry] Resource group has been added as a optional parameter to all endpoints. Set it to `"default"` if it was not set before. Examples:
36-
- `client.importPromptTemplate(File)` --> `client.importPromptTemplate("default", File)`.
37-
- `client.parsePromptTemplateById(id, false, inputParams)` --> `client.parsePromptTemplateById(id, "default", false, inputParams)`.
38-
39-
- [Document Grounding] All classes with `Retrieval` have been renamed to fix the typo
40-
- for example: `RetievalSearchResults` has been renamed to `RetrievalSearchResults`
41-
- [Document Grounding] `PipelinesApi#getAllPipelines()` and `PipelinesApi#getPipelineById()` now any of these 3 classes implementing the `GetPipeline` interface:
42-
- `MSSharePointPipelineGetResponse`, `S3PipelineGetResponse` and `SFTPPipelineGetResponse`
15+
4316

4417
### ✨ New Functionality
4518

46-
- [Orchestration] Added support for [transforming a JSON output into an entity](https://sap.github.io/ai-sdk/docs/java/orchestration/chat-completion#json_schema)
47-
- [Orchestration] Added `AzureContentFilter#promptShield()` available for input filtering.
48-
- [Orchestration] Added new models for `OrchestrationAiModel`: `GEMINI_2_5_FLASH`, `GEMINI_2_5_PRO`, `ALEPHALPHA_PHARIA_1_7B_CONTROL`, `OPENAI_O4_MINI`, `CLAUDE_4_OPUS`, `CLAUDE_4_SONNET`, `OPENAI_O3`.
19+
-
4920

5021
### 📈 Improvements
5122

5223
-
5324

5425
### 🐛 Fixed Issues
5526

56-
- [Orchestration] Resolved duplicate JSON property issue, enabling Anthropic Claude chat completions.
27+
-

foundation-models/openai/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.sap.ai.sdk</groupId>
66
<artifactId>sdk-parent</artifactId>
7-
<version>1.9.0-SNAPSHOT</version>
7+
<version>1.10.0-SNAPSHOT</version>
88
<relativePath>../../pom.xml</relativePath>
99
</parent>
1010
<groupId>com.sap.ai.sdk.foundationmodels</groupId>
@@ -31,6 +31,11 @@
3131
<organizationUrl>https://www.sap.com</organizationUrl>
3232
</developer>
3333
</developers>
34+
<scm>
35+
<connection>scm:git:git://github.com/SAP/ai-sdk-java.git</connection>
36+
<developerConnection>scm:git:ssh://github.com:SAP/ai-sdk-java.git</developerConnection>
37+
<url>https://github.com/SAP/ai-sdk-java/tree/main</url>
38+
</scm>
3439
<properties>
3540
<project.rootdir>${project.basedir}/../../</project.rootdir>
3641
<coverage.complexity>72%</coverage.complexity>

orchestration/pom.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>com.sap.ai.sdk</groupId>
66
<artifactId>sdk-parent</artifactId>
7-
<version>1.9.0-SNAPSHOT</version>
7+
<version>1.10.0-SNAPSHOT</version>
88
</parent>
99
<artifactId>orchestration</artifactId>
1010
<name>Orchestration client</name>
@@ -29,6 +29,11 @@
2929
<organizationUrl>https://www.sap.com</organizationUrl>
3030
</developer>
3131
</developers>
32+
<scm>
33+
<connection>scm:git:git://github.com/SAP/ai-sdk-java.git</connection>
34+
<developerConnection>scm:git:ssh://github.com:SAP/ai-sdk-java.git</developerConnection>
35+
<url>https://github.com/SAP/ai-sdk-java/tree/main</url>
36+
</scm>
3237
<properties>
3338
<project.rootdir>${project.basedir}/../</project.rootdir>
3439
<coverage.complexity>82%</coverage.complexity>

orchestration/src/main/java/com/sap/ai/sdk/orchestration/ContentFilter.java

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

3+
import com.google.common.annotations.Beta;
34
import com.sap.ai.sdk.orchestration.model.InputFilterConfig;
45
import com.sap.ai.sdk.orchestration.model.OutputFilterConfig;
56
import javax.annotation.Nonnull;
@@ -23,6 +24,7 @@ public interface ContentFilter {
2324
*
2425
* @return the corresponding {@link InputFilterConfig} object.
2526
*/
27+
@Beta
2628
@Nonnull
2729
InputFilterConfig createInputFilterConfig();
2830

@@ -32,6 +34,7 @@ public interface ContentFilter {
3234
*
3335
* @return the corresponding {@link OutputFilterConfig} object.
3436
*/
37+
@Beta
3538
@Nonnull
3639
OutputFilterConfig createOutputFilterConfig();
3740
}

0 commit comments

Comments
 (0)