feat: support moonshot again (#442)

pull/444/head
sigoden 4 weeks ago committed by GitHub
parent 29a4ffd514
commit 503ec98bd1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -119,3 +119,7 @@ clients:
# See https://help.aliyun.com/zh/dashscope/
- type: qianwen
api_key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# See https://platform.moonshot.cn/docs/intro
- type: moonshot
api_key: sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

@ -32,4 +32,5 @@ register_client!(
(ollama, "ollama", OllamaConfig, OllamaClient),
(ernie, "ernie", ErnieConfig, ErnieClient),
(qianwen, "qianwen", QianwenConfig, QianwenClient),
(moonshot, "moonshot", MoonshotConfig, MoonshotClient),
);

@ -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),
]
);
Loading…
Cancel
Save