File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
sample-code/spring-app/src/main/java/com/sap/ai/sdk/app Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff 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 /**
Original file line number Diff line number Diff 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 ();
You can’t perform that action at this time.
0 commit comments