Skip to content

Commit da3f72d

Browse files
committed
small stuff
1 parent 2d566b9 commit da3f72d

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationConvenienceUnitTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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",

orchestration/src/test/java/com/sap/ai/sdk/orchestration/OrchestrationUnitTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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);

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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");

0 commit comments

Comments
 (0)