summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-09-02 10:38:53 +0800
committerGitHub <noreply@github.com>2024-09-02 10:38:53 +0800
commitdc78636129427111e8949dcb0160aee15c0f3e91 (patch)
treeab4ea2661830e61911cebfc16c7ac41216f9f392 /src
parente39498e340a192077ec64d14c72470cd99716a71 (diff)
downloadaichat-dc78636129427111e8949dcb0160aee15c0f3e91.tar.gz
feat: add huggingface client (#822)
Diffstat (limited to 'src')
-rw-r--r--src/client/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs
index ecafd3c..eb9d3e9 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -37,7 +37,7 @@ register_client!(
(ernie, "ernie", ErnieConfig, ErnieClient),
);
-pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 19] = [
+pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 20] = [
("ai21", "https://api.ai21.com/studio/v1"),
("cloudflare", ""),
("deepinfra", "https://api.deepinfra.com/v1/openai"),
@@ -45,7 +45,7 @@ pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 19] = [
("fireworks", "https://api.fireworks.ai/inference/v1"),
("github", "https://models.inference.ai.azure.com"),
("groq", "https://api.groq.com/openai/v1"),
- ("jina", "https://api.jina.ai/v1"),
+ ("huggingface", "https://api-inference.huggingface.co/v1"),
("lingyiwanwu", "https://api.lingyiwanwu.com/v1"),
("mistral", "https://api.mistral.ai/v1"),
("moonshot", "https://api.moonshot.cn/v1"),
@@ -59,5 +59,7 @@ pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 19] = [
),
("together", "https://api.together.xyz/v1"),
("zhipuai", "https://open.bigmodel.cn/api/paas/v4"),
+ // RAG-dedicated
+ ("jina", "https://api.jina.ai/v1"),
("voyageai", "https://api.voyageai.com/v1"),
];