feat!: add function calling support to client.chat() & client.chat_async()

BREAKING CHANGE: Too many to count in this version. Check the README examples.
This commit is contained in:
Ivan Gabriele
2024-03-09 11:28:50 +01:00
parent 9430d42382
commit 74bf8a96ee
30 changed files with 1510 additions and 322 deletions

View File

@@ -0,0 +1,11 @@
use mistralai_client::v1::client::Client;
#[tokio::main]
async fn main() {
// This example suppose you have set the `MISTRAL_API_KEY` environment variable.
let client = Client::new(None, None, None, None).unwrap();
let result = client.list_models_async().await.unwrap();
println!("First Model ID: {:?}", result.data[0].id);
// => "First Model ID: open-mistral-7b"
}