From 0264ab80ab56d1ae78470c3fe860580b5bdc676a Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 11 Jul 2024 07:40:24 +0800 Subject: refactor: update models.yaml and abandon anyscale (#701) --- src/client/mod.rs | 3 +-- src/client/vertexai.rs | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src/client') diff --git a/src/client/mod.rs b/src/client/mod.rs index 6878541..b4c0091 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -51,8 +51,7 @@ register_client!( (qianwen, "qianwen", QianwenConfig, QianwenClient), ); -pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 13] = [ - ("anyscale", "https://api.endpoints.anyscale.com/v1"), +pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 12] = [ ("deepinfra", "https://api.deepinfra.com/v1/openai"), ("deepseek", "https://api.deepseek.com"), ("fireworks", "https://api.fireworks.ai/inference/v1"), diff --git a/src/client/vertexai.rs b/src/client/vertexai.rs index a4c4050..828c300 100644 --- a/src/client/vertexai.rs +++ b/src/client/vertexai.rs @@ -69,14 +69,10 @@ impl VertexAIClient { let base_url = format!("https://{location}-aiplatform.googleapis.com/v1/projects/{project_id}/locations/{location}/publishers"); let url = format!("{base_url}/google/models/{}:predict", self.model.name()); - let task_type = match data.query { - true => "RETRIEVAL_DOCUMENT", - false => "QUESTION_ANSWERING", - }; let instances: Vec<_> = data .texts .into_iter() - .map(|v| json!({"task_type": task_type, "content": v})) + .map(|v| json!({"content": v})) .collect(); let body = json!({ "instances": instances, -- cgit v1.2.3