docs(readme): update examples

This commit is contained in:
Ivan Gabriele
2024-03-09 11:41:39 +01:00
parent 74bf8a96ee
commit ab91154d35

View File

@@ -182,7 +182,7 @@ async fn main() {
let stream_result = client
.chat_stream(model, messages, Some(options))
.await
.expect("Failed to create stream.");
.unwrap();
stream_result
.for_each(|chunk_result| async {
match chunk_result {
@@ -197,7 +197,6 @@ async fn main() {
}
})
.await;
print!("\n") // To persist the last chunk output.
}
```