File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Add Maven dependency.
17
17
<dependency >
18
18
<groupId >com.javaaidev</groupId >
19
19
<artifactId >springai-openai-client</artifactId >
20
- <version >0.6 .0</version >
20
+ <version >0.7 .0</version >
21
21
</dependency >
22
22
```
23
23
@@ -27,6 +27,7 @@ Supported features:
27
27
28
28
- Chat completions
29
29
- Function calling
30
+ - Streaming mode
30
31
31
32
### Use ChatModel
32
33
@@ -52,6 +53,19 @@ val response = chatClient.prompt().user("tell me a joke")
52
53
.call().content()
53
54
```
54
55
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
+
55
69
## EmbeddingModel
56
70
57
71
To use this ` EmbeddingModel ` ,
You can’t perform that action at this time.
0 commit comments