File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
orchestration/src/test/java/com/sap/ai/sdk/orchestration
sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/services Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -183,9 +183,9 @@ void testTemplateReferenceConstruction() {
183183
184184 @ Test
185185 void testTemplateFromLocalFileWithJsonSchemaAndTools () throws IOException {
186- String promptTemplateYAML =
186+ String promptTemplateYaml =
187187 Files .readString (Path .of ("src/test/resources/promptTemplateExample.yaml" ));
188- var templateWithJsonSchemaTools = TemplateConfig .create ().fromYaml (promptTemplateYAML );
188+ var templateWithJsonSchemaTools = TemplateConfig .create ().fromYaml (promptTemplateYaml );
189189 var schema =
190190 Map .of (
191191 "type" ,
Original file line number Diff line number Diff line change @@ -990,11 +990,11 @@ void testTemplateFromInput() throws IOException {
990990 .withBodyFile ("templateReferenceResponse.json" )
991991 .withHeader ("Content-Type" , "application/json" )));
992992
993- var promptTemplateYAML =
993+ var promptTemplateYaml =
994994 Files .readString (Path .of ("src/test/resources/promptTemplateExample.yaml" ));
995995
996- var template = TemplateConfig .create ().fromYaml (promptTemplateYAML );
997- var configWithTemplate = config .withTemplateConfig (template );
996+ var template = TemplateConfig .create ().fromYaml (promptTemplateYaml );
997+ var configWithTemplate = template != null ? config .withTemplateConfig (template ) : config ;
998998
999999 var inputParams = Map .of ("language" , "German" );
10001000 var prompt = new OrchestrationPrompt (inputParams );
Original file line number Diff line number Diff line change @@ -525,8 +525,8 @@ public OrchestrationChatResponse templateFromPromptRegistryByScenario(
525525 @ Nonnull
526526 public OrchestrationChatResponse localPromptTemplate (@ Nonnull final String filePath )
527527 throws IOException {
528- val promptTemplateYAML = Files .readString (Path .of (filePath ));
529- val template = TemplateConfig .create ().fromYaml (promptTemplateYAML );
528+ val promptTemplateYaml = Files .readString (Path .of (filePath ));
529+ val template = TemplateConfig .create ().fromYaml (promptTemplateYaml );
530530 val configWithTemplate = template != null ? config .withTemplateConfig (template ) : config ;
531531
532532 val inputParams = Map .of ("language" , "German" );
You can’t perform that action at this time.
0 commit comments