Skip to content

Commit dcc826d

Browse files
fix: HTML homepage collapse (#395)
* fix: HTML homepage collapse * align order in controller
1 parent 80924d1 commit dcc826d

File tree

2 files changed

+367
-269
lines changed

2 files changed

+367
-269
lines changed

sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OrchestrationController.java

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,30 @@ Object messagesHistory(
8383
return response.getContent();
8484
}
8585

86+
@GetMapping("/image")
87+
@Nonnull
88+
Object imageInput(@RequestParam(value = "format", required = false) final String format) {
89+
final var response =
90+
service.imageInput(
91+
"https://upload.wikimedia.org/wikipedia/commons/thumb/5/59/SAP_2011_logo.svg/440px-SAP_2011_logo.svg.png");
92+
if ("json".equals(format)) {
93+
return response;
94+
}
95+
return response.getContent();
96+
}
97+
98+
@GetMapping("/multiString")
99+
@Nonnull
100+
Object multiStringInput(@RequestParam(value = "format", required = false) final String format) {
101+
final var response =
102+
service.multiStringInput(
103+
List.of("What is the capital of France?", "What is Chess about?", "What is 2+2?"));
104+
if ("json".equals(format)) {
105+
return response;
106+
}
107+
return response.getContent();
108+
}
109+
86110
@GetMapping("/inputFiltering/{policy}")
87111
@Nonnull
88112
Object inputFiltering(
@@ -203,30 +227,6 @@ Object groundingHelpSapCom(
203227
return response.getContent();
204228
}
205229

206-
@GetMapping("/image")
207-
@Nonnull
208-
Object imageInput(@RequestParam(value = "format", required = false) final String format) {
209-
final var response =
210-
service.imageInput(
211-
"https://upload.wikimedia.org/wikipedia/commons/thumb/5/59/SAP_2011_logo.svg/440px-SAP_2011_logo.svg.png");
212-
if ("json".equals(format)) {
213-
return response;
214-
}
215-
return response.getContent();
216-
}
217-
218-
@GetMapping("/multiString")
219-
@Nonnull
220-
Object multiStringInput(@RequestParam(value = "format", required = false) final String format) {
221-
final var response =
222-
service.multiStringInput(
223-
List.of("What is the capital of France?", "What is Chess about?", "What is 2+2?"));
224-
if ("json".equals(format)) {
225-
return response;
226-
}
227-
return response.getContent();
228-
}
229-
230230
@GetMapping("/responseFormatJsonSchema")
231231
@Nonnull
232232
Object responseFormatJsonSchema(

0 commit comments

Comments
 (0)