Skip to content

Commit bdca2be

Browse files
committed
Merge branch 'main' into Data-Masking-Config
2 parents dcbb7eb + e08a9fc commit bdca2be

28 files changed

+2256
-178
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: "Cache Maven Dependencies"
2+
permissions:
3+
contents: read
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: '57 4 * * Sun'
9+
10+
env:
11+
MAVEN_CACHE_REF: refs/heads/main
12+
MAVEN_CACHE_KEY: maven-dependencies
13+
MAVEN_CACHE_DIR: ~/.m2
14+
15+
jobs:
16+
update-cache:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: "Checkout"
20+
uses: actions/checkout@v5
21+
with:
22+
ref: ${{ env.MAVEN_CACHE_REF }}
23+
24+
- name: "Setup Java"
25+
uses: actions/setup-java@v5
26+
with:
27+
distribution: "sapmachine"
28+
java-version: 17
29+
30+
- name: "Download Dependencies"
31+
run: mvn -B dependency:go-offline
32+
33+
- name: "Delete Existing Caches"
34+
run: |
35+
CACHE_IDS=$(gh cache list --key "${{ env.MAVEN_CACHE_KEY }}" --ref "${{ env.MAVEN_CACHE_REF }}" --json id | jq -r '.[] | .id')
36+
for CACHE_ID in $CACHE_IDS; do
37+
echo "Deleting cache with ID: $CACHE_ID"
38+
gh cache delete "${CACHE_ID}"
39+
done
40+
env:
41+
GH_TOKEN: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}
42+
43+
- name: "Cache Dependencies"
44+
uses: actions/cache/save@v4
45+
with:
46+
path: ${{ env.MAVEN_CACHE_DIR }}
47+
key: ${{ env.MAVEN_CACHE_KEY }}

.github/workflows/continuous-integration.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ env:
1010
MVN_MULTI_THREADED_ARGS: --batch-mode --no-transfer-progress --fail-at-end --show-version --threads 1C
1111
MVN_SKIP_CI_PLUGINS: -DskipFormatting -Denforcer.skip -Djacoco.skip -Dmdep.analyze.skip
1212
JAVA_VERSION: 17
13+
# keep the following two variables in sync with our 'cache-maven-dependencies.yaml' workflow
14+
MAVEN_CACHE_KEY: maven-dependencies
15+
MAVEN_CACHE_DIR: ~/.m2
1316

1417
jobs:
1518

@@ -33,6 +36,13 @@ jobs:
3336
java-version: ${{ env.JAVA_VERSION }}
3437
cache: 'maven'
3538

39+
- name: "Restore Dependencies"
40+
id: restore-dependencies
41+
uses: actions/cache/restore@v4
42+
with:
43+
key: ${{ env.MAVEN_CACHE_KEY }}
44+
path: ${{ env.MAVEN_CACHE_DIR }}
45+
3646
- name: "REUSE Compliance Check"
3747
uses: fsfe/reuse-action@v5
3848

.github/workflows/fosstars-report.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,16 @@ jobs:
4141
MVN_ARGS="${{ env.MVN_MULTI_THREADED_ARGS }} clean install -DskipTests -DskipFormatting"
4242
mvn $MVN_ARGS
4343
44+
- name: "Create settings.xml"
45+
run: |
46+
echo '${{ secrets.OSS_INDEX_SETTINGS_XML }}' > settings.xml
47+
4448
- name: "CVE Scan"
4549
env:
4650
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
47-
run: |
48-
mvn -T1 --no-transfer-progress --batch-mode org.owasp:dependency-check-maven:check org.owasp:dependency-check-maven:aggregate
51+
run: >
52+
mvn -T1 --no-transfer-progress -s settings.xml
53+
--batch-mode org.owasp:dependency-check-maven:check org.owasp:dependency-check-maven:aggregate
4954
5055
- name: "Archive CVE Report"
5156
uses: actions/upload-artifact@v4

.github/workflows/spec-update.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ on:
2727
env:
2828
MVN_MULTI_THREADED_ARGS: --batch-mode --no-transfer-progress --fail-at-end --show-version --threads 1C
2929
JAVA_VERSION: 17
30+
# keep the following two variables in sync with our 'cache-maven-dependencies.yaml' workflow
31+
MAVEN_CACHE_KEY: maven-dependencies
32+
MAVEN_CACHE_DIR: ~/.m2
3033

3134
jobs:
3235
generate:
@@ -59,6 +62,13 @@ jobs:
5962
java-version: ${{ env.JAVA_VERSION }}
6063
cache: 'maven'
6164

65+
- name: "Restore Dependencies"
66+
id: restore-dependencies
67+
uses: actions/cache/restore@v4
68+
with:
69+
key: ${{ env.MAVEN_CACHE_KEY }}
70+
path: ${{ env.MAVEN_CACHE_DIR }}
71+
6272
- name: "Checkout or Create Branch"
6373
id: branch
6474
# Checkout branch if it exists, otherwise create it

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,26 @@ The SDK simplifies the setup and interaction with SAP AI Core, allowing you to f
3030

3131
## General Requirements
3232

33-
To use the SDK in a Java application, it is necessary to understand the technical prerequisites and required versions for common dependencies.
33+
#### Development Environment
3434

35-
- Java 17 or higher.
36-
- Access to an **SAP AI Core Service** instance.
35+
These are required on the developer side to build and run applications with the SDK:
3736

38-
Please refer to [this documentation on **how to connect the SDK to AI Core**](https://sap.github.io/ai-sdk/docs/java/guides/connecting-to-ai-core).
37+
* **Java JDK**: 17 or higher (21 LTS recommended).
38+
* **SAP Cloud SDK**: 5.6.0 or later (latest recommended, added as a Maven dependency).
3939

40-
The following table lists the required versions, based on the latest release:
40+
#### SAP AI Core Service instance
4141

42-
| Dependency | Minimum Version | Recommended Version |
43-
|------------------------|-----------------|---------------------|
44-
| JDK | 17 (LTS) | 21 (LTS) |
45-
| SAP Cloud SDK | 5.6.0 | latest |
46-
| (optional) CAP Java | 3.0.0 | latest |
47-
| (optional) Spring Boot | 3.0 | latest |
48-
| (optional) Spring AI | 1.0.0 | latest |
42+
To make of use the services supported by the SDK, you need to have access to an SAP AI Core Service instance. Checkout [how to connect](link).
4943

50-
See [an example `pom.xml` in our Spring Boot application](sample-code/spring-app/pom.xml).
44+
#### Optional Integrations
45+
46+
The SDK can be combined with popular Java frameworks. These are not required for core functionality, but version compatibility is listed for reference:
47+
48+
* **Spring AI** ≥ 1.0.0
49+
* **Spring Boot** ≥ 3.0
50+
* **CAP Java** ≥ 3.0.0
51+
52+
👉 See an [example `pom.xml`](link) in our sample Spring Boot application.
5153

5254
> [!WARNING]
5355
> All classes under any of the `...model` packages are generated from an OpenAPI specification and marked as `@Beta`.

docs/release_notes.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,34 @@
88

99
### 🔧 Compatibility Notes
1010

11-
-
11+
- Breaking change:
12+
- two fields in `OrchestrationModuleConfig` changed:
13+
- `inputTranslationConfig` is now of type `SAPDocumentTranslationInput`
14+
- `outputTranslationConfig` is now of type `SAPDocumentTranslationOutput`
15+
- when using `OrchestrationModuleConfig.withInputTranslationConfig()` and `OrchestrationModuleConfig.withOutputTranslationConfig()` consider the following diff:
16+
```diff
17+
var config = new OrchestrationModuleConfig("some prompt");
18+
config
19+
.withInputTranslationConfig(
20+
- SAPDocumentTranslation.create()
21+
- .type(SAP_DOCUMENT_TRANSLATION)
22+
- .config(SAPDocumentTranslationConfig.create().targetLanguage("en-US")))
23+
+ SAPDocumentTranslationInput.create()
24+
+ .type(SAPDocumentTranslationInput.TypeEnum.SAP_DOCUMENT_TRANSLATION)
25+
+ .config(SAPDocumentTranslationInputConfig.create().targetLanguage("en-US")))
26+
.withOutputTranslationConfig(
27+
- SAPDocumentTranslation.create()
28+
- .type(SAP_DOCUMENT_TRANSLATION)
29+
+ SAPDocumentTranslationOutput.create()
30+
+ .type(SAPDocumentTranslationOutput.TypeEnum.SAP_DOCUMENT_TRANSLATION)
31+
.config(
32+
- SAPDocumentTranslationConfig.create()
33+
- .targetLanguage("de-DE")
34+
+ SAPDocumentTranslationOutputConfig.create()
35+
+ .targetLanguage(
36+
+ SAPDocumentTranslationOutputTargetLanguage.create("de-DE"))
37+
.sourceLanguage("en-US")));
38+
```
1239

1340
### ✨ New Functionality
1441

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
import com.sap.ai.sdk.orchestration.model.MaskingModuleConfigProviders;
1010
import com.sap.ai.sdk.orchestration.model.OutputFilteringConfig;
1111
import com.sap.ai.sdk.orchestration.model.PromptTemplatingModuleConfigPrompt;
12-
import com.sap.ai.sdk.orchestration.model.SAPDocumentTranslation;
12+
import com.sap.ai.sdk.orchestration.model.SAPDocumentTranslationInput;
13+
import com.sap.ai.sdk.orchestration.model.SAPDocumentTranslationOutput;
1314
import java.util.ArrayList;
1415
import java.util.Arrays;
1516
import java.util.Objects;
@@ -96,9 +97,9 @@ public class OrchestrationModuleConfig {
9697
*/
9798
@Nullable GroundingModuleConfig groundingConfig;
9899

99-
@Nullable SAPDocumentTranslation inputTranslationConfig;
100+
@Nullable SAPDocumentTranslationInput inputTranslationConfig;
100101

101-
@Nullable SAPDocumentTranslation outputTranslationConfig;
102+
@Nullable SAPDocumentTranslationOutput outputTranslationConfig;
102103

103104
/**
104105
* Creates a new configuration with the given LLM configuration.

0 commit comments

Comments
 (0)