Add getting-started module: ChatClient fluent API, system/user prompts, streaming, and provider switching via spring.ai.model.chat
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user