File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 >
Original file line number Diff line number Diff line change 1010import com .sap .ai .sdk .orchestration .DpiMasking ;
1111import com .sap .ai .sdk .orchestration .OrchestrationClientException ;
1212import com .sap .ai .sdk .orchestration .OrchestrationModuleConfig ;
13- import com .sap .ai .sdk .orchestration .ResponseJsonSchema ;
14- import com .sap .ai .sdk .orchestration .TemplateConfig ;
1513import com .sap .ai .sdk .orchestration .model .DPIEntities ;
1614import com .sap .ai .sdk .orchestration .spring .OrchestrationChatModel ;
1715import 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}
You can’t perform that action at this time.
0 commit comments