feat!: wrap Client::new() return in a Result

BREAKING CHANGE: `Client::new()` now returns a `Result`.
This commit is contained in:
Ivan Gabriele
2024-03-04 04:43:16 +01:00
parent 1deab88251
commit 33876183e4
7 changed files with 25 additions and 20 deletions

View File

@@ -3,7 +3,7 @@ use mistralai_client::v1::{client::Client, constants::EmbedModel};
#[test]
fn test_client_embeddings() {
let client: Client = Client::new(None, None, None, None);
let client: Client = Client::new(None, None, None, None).unwrap();
let model = EmbedModel::MistralEmbed;
let input = vec!["Embed this sentence.", "As well as this one."]