File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Add Maven dependency.
1717<dependency >
1818 <groupId >com.javaaidev</groupId >
1919 <artifactId >springai-openai-client</artifactId >
20- <version >0.6 .0</version >
20+ <version >0.7 .0</version >
2121</dependency >
2222```
2323
@@ -27,6 +27,7 @@ Supported features:
2727
2828- Chat completions
2929- Function calling
30+ - Streaming mode
3031
3132### Use ChatModel
3233
@@ -52,6 +53,19 @@ val response = chatClient.prompt().user("tell me a joke")
5253 .call().content()
5354```
5455
56+ ### Streaming
57+
58+ Streaming mode is also supported.
59+
60+ ``` kotlin
61+ val builder = StringBuilder ()
62+ chatClient.prompt().user(" tell me a joke" )
63+ .stream().chatResponse().doOnNext {
64+ builder.append(it.result.output.text)
65+ }.blockLast()
66+ val result = builder.toString()
67+ ```
68+
5569## EmbeddingModel
5670
5771To use this ` EmbeddingModel ` ,
You can’t perform that action at this time.
0 commit comments