File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
sample-code/spring-app/src/main/java/com/sap/ai/sdk/app Expand file tree Collapse file tree 2 files changed +3
-5
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 (100 );
59+ return service .streamChatCompletion ("developing a software project" );
6060 }
6161
6262 /**
Original file line number Diff line number Diff line change @@ -239,12 +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 (final int numberOfFibonacci ) {
242+ public ResponseEntity <ResponseBodyEmitter > streamChatCompletion (@ Nonnull final String topic ) {
243243 final var prompt =
244244 new OrchestrationPrompt (
245- "Can you give me the first "
246- + numberOfFibonacci
247- + " numbers of the Fibonacci sequence?" );
245+ "Please create a small story about " + topic + " with around 700 words." );
248246 final var stream = client .streamChatCompletion (prompt , config );
249247
250248 final var emitter = new ResponseBodyEmitter ();
You can’t perform that action at this time.
0 commit comments