We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cabe252 commit 4248561Copy full SHA for 4248561
sample-code/spring-app/src/main/java/com/sap/ai/sdk/app/controllers/OrchestrationController.java
@@ -40,14 +40,12 @@ ResponseEntity<String> completion(
40
@RequestHeader(value = "accept", required = false) final String accept)
41
throws JsonProcessingException {
42
final var response = service.completion("HelloWorld!");
43
- final var content = response.getContent();
44
- log.info("Our trusty AI answered with: {}", content);
45
if (accept.equals("application/json")) {
46
return ResponseEntity.ok()
47
.contentType(MediaType.APPLICATION_JSON)
48
.body(mapper.writeValueAsString(response));
49
}
50
- return ResponseEntity.ok(content);
+ return ResponseEntity.ok(response.getContent());
51
52
53
/**
0 commit comments