Add getting-started module: ChatClient fluent API, system/user prompts, streaming, and provider switching via spring.ai.model.chat

This commit is contained in:
2026-09-23 04:20:52 +00:00
committed by Claude
parent 1d4625a1c2
commit c1fc41e0de
22 changed files with 697 additions and 0 deletions
@@ -0,0 +1,9 @@
# GET /api/chat/as -- a templated system prompt, filled via .param("voice", ...)
$ curl 'http://localhost:34201/api/chat/as?voice=pirate&message=Where+is+my+jar+cached'
Response body:
As a pirate: Where is my jar cached -- yes, and it is exactly 22 characters long.
Exact text FakeChatModel received (proves the {voice} placeholder was substituted by ChatClient before the ChatModel ever saw the prompt):
Answer in the voice of a pirate, still in two sentences.Where is my jar cached