feat: add client.list_models_async() method

This commit is contained in:
Ivan Gabriele
2024-03-04 06:32:01 +01:00
parent 75788b9395
commit b69f7c617c
3 changed files with 183 additions and 142 deletions

View File

@@ -0,0 +1,20 @@
use jrest::expect;
use mistralai_client::v1::client::Client;
#[tokio::test]
async fn test_client_list_models_async() {
let client = Client::new(None, None, None, None).unwrap();
let response = client.list_models_async().await.unwrap();
expect!(response.object).to_be("list".to_string());
expect!(response.data.len()).to_be_greater_than(0);
// let open_mistral_7b_data_item = response
// .data
// .iter()
// .find(|item| item.id == "open-mistral-7b")
// .unwrap();
// expect!(open_mistral_7b_data_item.id).to_be("open-mistral-7b".to_string());
}