Skip to content

Commit ed4fb29

Browse files
authored
Update zhipuai-chat.adoc (#3531)
* Update zhipuai-chat docs example with "produces = MediaType.TEXT_EVENT_STREAM_VALUE" ( Content-Type = "text/event-stream" ) in the "@GetMapping" annotation. Auto-cherry-pick to 1.0.x Signed-off-by: 老虎是条大狼狗 <[email protected]>
1 parent e478804 commit ed4fb29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/zhipuai-chat.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public class ChatController {
210210
return Map.of("generation", this.chatModel.call(message));
211211
}
212212
213-
@GetMapping("/ai/generateStream")
213+
@GetMapping(value = "/ai/generateStream", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
214214
public Flux<ChatResponse> generateStream(@RequestParam(value = "message", defaultValue = "Tell me a joke") String message) {
215215
var prompt = new Prompt(new UserMessage(message));
216216
return this.chatModel.stream(prompt);

0 commit comments

Comments
 (0)