Skip to content

Commit 5e44c3b

Browse files
authored
Merge branch 'main' into spec-update/orchestration/main
2 parents 520aee5 + 7404d71 commit 5e44c3b

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.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

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ https://gitbox.apache.org/repos/asf?p=maven-pmd-plugin.git;a=blob_plain;f=src/ma
780780
<suppressionFile>${project.rootdir}/.pipeline/dependency-check-suppression.xml</suppressionFile>
781781
<nvdValidForHours>46</nvdValidForHours>
782782
<skipProvidedScope>true</skipProvidedScope>
783+
<ossIndexServerId>ossindex</ossIndexServerId>
783784
</configuration>
784785
</plugin>
785786
</plugins>

sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services/SpringAiOrchestrationService.java

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
import com.sap.ai.sdk.orchestration.DpiMasking;
1111
import com.sap.ai.sdk.orchestration.OrchestrationClientException;
1212
import com.sap.ai.sdk.orchestration.OrchestrationModuleConfig;
13-
import com.sap.ai.sdk.orchestration.ResponseJsonSchema;
14-
import com.sap.ai.sdk.orchestration.TemplateConfig;
1513
import com.sap.ai.sdk.orchestration.model.DPIEntities;
1614
import com.sap.ai.sdk.orchestration.spring.OrchestrationChatModel;
1715
import com.sap.ai.sdk.orchestration.spring.OrchestrationChatOptions;
@@ -261,13 +259,9 @@ public record Translation(
261259
public Translation responseFormat() {
262260
val cl = ChatClient.builder(new OrchestrationChatModel()).build();
263261

264-
val schema = ResponseJsonSchema.fromType(Translation.class);
265-
val template = TemplateConfig.create().withJsonSchemaResponse(schema);
266-
267-
val options = new OrchestrationChatOptions(config.withTemplateConfig(template));
268262
val prompt =
269-
new Prompt("How do I say 'AI is going to revolutionize the world' in dutch?", options);
270-
263+
new Prompt(
264+
"How do I say 'AI is going to revolutionize the world' in dutch?", defaultOptions);
271265
return cl.prompt(prompt).call().entity(Translation.class);
272266
}
273267
}

0 commit comments

Comments
 (0)