Skip to content

Commit 92ca18e

Browse files
committed
Update README.md
1 parent e4cb4a8 commit 92ca18e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff 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

5771
To use this `EmbeddingModel`,

0 commit comments

Comments
 (0)