feat!: add client.chat_stream() method

BREAKING CHANGE: You can't set the `stream` option for `client.chat*()`.

Either use `client.chat_stream()` if you want to use streams
or use `client.chat()` / `client.chat_async()` otherwise.
This commit is contained in:
Ivan Gabriele
2024-03-04 08:16:06 +01:00
parent f91e794d71
commit 4a4219d3ea
7 changed files with 252 additions and 46 deletions

View File

@@ -15,7 +15,8 @@ readme = "README.md"
repository = "https://github.com/ivangabriele/mistralai-client-rs"
[dependencies]
reqwest = { version = "0.11.24", features = ["json", "blocking"] }
futures = "0.3.30"
reqwest = { version = "0.11.24", features = ["json", "blocking", "stream"] }
serde = { version = "1.0.197", features = ["derive"] }
serde_json = "1.0.114"
thiserror = "1.0.57"