summaryrefslogtreecommitdiffstats
path: root/src/client/moonshot.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-04-25 21:19:04 +0800
committerGitHub <noreply@github.com>2024-04-25 21:19:04 +0800
commit503ec98bd14fd833c5687790234f550a24b01107 (patch)
treef9508313553533e11d6423951a999583a72c3698 /src/client/moonshot.rs
parent29a4ffd5146af917af3fba30c7d3b7739c7bad0c (diff)
downloadaichat-503ec98bd14fd833c5687790234f550a24b01107.tar.gz
feat: support moonshot again (#442)
Diffstat (limited to 'src/client/moonshot.rs')
-rw-r--r--src/client/moonshot.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/moonshot.rs b/src/client/moonshot.rs
new file mode 100644
index 0000000..6befadb
--- /dev/null
+++ b/src/client/moonshot.rs
@@ -0,0 +1,11 @@
+openai_compatible_module!(
+ MoonshotConfig,
+ MoonshotClient,
+ "https://api.moonshot.cn/v1",
+ [
+ // https://platform.moonshot.cn/docs/intro#%E6%A8%A1%E5%9E%8B%E5%88%97%E8%A1%A8
+ ("moonshot-v1-8k", "text", 8000),
+ ("moonshot-v1-32k", "text", 32000),
+ ("moonshot-v1-128k", "text", 128000),
+ ]
+);