summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-10-23 07:46:59 +0800
committerGitHub <noreply@github.com>2024-10-23 07:46:59 +0800
commit8add4de77bee9e00a60e6c7f40276972cf3ea91f (patch)
treea220902243c715b6ff25b160abce71a0be2313d4 /src
parentb82eb8969cd6b4d698b2636ac58f1bfe365e7893 (diff)
downloadaichat-8add4de77bee9e00a60e6c7f40276972cf3ea91f.tar.gz
feat: support xai (grok) client (#945)
Diffstat (limited to 'src')
-rw-r--r--src/client/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/mod.rs b/src/client/mod.rs
index 24ced99..883d5f7 100644
--- a/src/client/mod.rs
+++ b/src/client/mod.rs
@@ -35,7 +35,7 @@ register_client!(
(ernie, "ernie", ErnieConfig, ErnieClient),
);
-pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 20] = [
+pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 21] = [
("ai21", "https://api.ai21.com/studio/v1"),
("cloudflare", ""),
("deepinfra", "https://api.deepinfra.com/v1/openai"),
@@ -56,6 +56,7 @@ pub const OPENAI_COMPATIBLE_PLATFORMS: [(&str, &str); 20] = [
),
("siliconflow", "https://api.siliconflow.cn/v1"),
("together", "https://api.together.xyz/v1"),
+ ("xai", "https://api.x.ai/v1"),
("zhipuai", "https://open.bigmodel.cn/api/paas/v4"),
// RAG-dedicated
("jina", "https://api.jina.ai/v1"),