Skip to content

Commit f084533

Browse files
committed
Update
1 parent e36dbed commit f084533

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ ResponseEntity<String> completion(
5656
@GetMapping("/streamChatCompletion")
5757
@Nonnull
5858
ResponseEntity<ResponseBodyEmitter> streamChatCompletion() {
59-
return service.streamChatCompletion();
59+
return service.streamChatCompletion("developing a software project");
6060
}
6161

6262
/**

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
@@ -239,10 +239,10 @@ public OrchestrationChatResponse grounding(@Nonnull final String groundingInput)
239239
* @return the emitter that streams the assistant message response
240240
*/
241241
@Nonnull
242-
public ResponseEntity<ResponseBodyEmitter> streamChatCompletion() {
242+
public ResponseEntity<ResponseBodyEmitter> streamChatCompletion(@Nonnull final String topic) {
243243
final var prompt =
244244
new OrchestrationPrompt(
245-
"Please create a small story about developing a software project with around 700 words.");
245+
"Please create a small story about " + topic + " with around 700 words.");
246246
final var stream = client.streamChatCompletion(prompt, config);
247247

248248
final var emitter = new ResponseBodyEmitter();

0 commit comments

Comments
 (0)