AppFlowy-Cloud/tests/ai_test/local_ai_test.rs
Nathan.fooo 71d292ebcd
chore: add app version when querying ai configuratino (#724)
* chore: update api endpoint that accepts app version

* chore: update env

* chore: disable locai ai config test
2024-08-13 11:14:32 +08:00

26 lines
822 B
Rust

use client_api_test::{local_ai_test_enabled, TestClient};
#[tokio::test]
async fn get_local_ai_config_test() {
if !local_ai_test_enabled() {
return;
}
let test_client = TestClient::new_user().await;
let workspace_id = test_client.workspace_id().await;
let config = test_client
.api_client
.get_local_ai_config(&workspace_id, "macos")
.await
.unwrap();
{
assert!(!config.models.is_empty());
assert!(!config.models[0].embedding_model.download_url.is_empty());
assert!(config.models[0].embedding_model.file_size > 10);
assert!(!config.models[0].chat_model.download_url.is_empty());
assert!(config.models[0].chat_model.file_size > 10);
assert!(!config.plugin.version.is_empty());
assert!(!config.plugin.url.is_empty());
println!("config: {:?}", config);
}
}