feat: add supports for zhipuai(chatglm)

This commit is contained in:
Junyan Qin
2025-01-06 20:27:10 +08:00
parent 8ed07b8d1a
commit 44b92909eb
8 changed files with 142 additions and 128 deletions
+59
View File
@@ -147,6 +147,65 @@
"name": "grok-beta",
"requester": "xai-chat-completions",
"token_mgr": "xai"
},
{
"name": "glm-4-plus",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai"
},
{
"name": "glm-4-0520",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai"
},
{
"name": "glm-4-air",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai"
},
{
"name": "glm-4-airx",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai"
},
{
"name": "glm-4-long",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai"
},
{
"name": "glm-4-flashx",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai"
},
{
"name": "glm-4-flash",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai"
},
{
"name": "glm-4v-plus",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai",
"vision_supported": true
},
{
"name": "glm-4v",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai",
"vision_supported": true
},
{
"name": "glm-4v-flash",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai",
"vision_supported": true
},
{
"name": "glm-zero-preview",
"requester": "zhipuai-chat-completions",
"token_mgr": "zhipuai",
"vision_supported": true
}
]
}
+8
View File
@@ -19,6 +19,9 @@
],
"xai": [
"xai-1234567890"
],
"zhipuai": [
"xxxxxxx"
]
},
"requester": {
@@ -58,6 +61,11 @@
"base-url": "https://api.x.ai/v1",
"args": {},
"timeout": 120
},
"zhipuai-chat-completions": {
"base-url": "https://open.bigmodel.cn/api/paas/v4",
"args": {},
"timeout": 120
}
},
"model": "gpt-4o",
+25
View File
@@ -66,6 +66,14 @@
"type": "string"
},
"default": []
},
"zhipuai": {
"type": "array",
"title": "智谱AI API 密钥",
"items": {
"type": "string"
},
"default": []
}
}
},
@@ -210,6 +218,23 @@
"default": 120
}
}
},
"zhipuai-chat-completions": {
"type": "object",
"title": "智谱AI API 请求配置",
"description": "仅可编辑 URL 和 超时时间,额外请求参数不支持可视化编辑,请到编辑器编辑",
"properties": {
"base-url": {
"type": "string",
"title": "API URL"
},
"args": {
"type": "object"
},
"timeout": {
"type": "number"
}
}
}
}
},