diff options
| author | sigoden <sigoden@gmail.com> | 2024-07-11 07:40:24 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-07-11 07:40:24 +0800 |
| commit | 0264ab80ab56d1ae78470c3fe860580b5bdc676a (patch) | |
| tree | 2a6c72e943dabc85815745a4d3bbb7aa27f047a2 /src/client | |
| parent | cee0eb453e37667185025a1328ce5dea9b2bef4a (diff) | |
| download | aichat-0264ab80ab56d1ae78470c3fe860580b5bdc676a.tar.gz | |
refactor: update models.yaml and abandon anyscale (#701)
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/mod.rs | 3 | ||||
| -rw-r--r-- | src/client/vertexai.rs | 6 |
2 files changed, 2 insertions, 7 deletions
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, |
