Closed MisteryLiuCode closed 4 months ago
好的,感谢
通义API是有DashScope提供的,本身做了openai的接口兼容: https://help.aliyun.com/zh/dashscope/developer-reference/compatibility-of-openai-with-dashscope/?spm=a2c4g.11186623.0.i2
因此可以这样配置:
{ "server_port": ":9099", "load_balancing": "random", "services": { "openai": [ { "models": ["qwen-plus"], "enabled": true, "credentials": { "api_key": "xxx" }, "server_url":"https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions" } ] } }
多个openai兼容的接口配置是否可以在一个openai节点下:
"openai": [
{
"models": ["qwen-plus"],
"enabled": true,
"credentials": {
"api_key": "xxx"
},
{
"models": ["claude-xxxx"],
"enabled": true,
"credentials": {
"api_key": "xxx"
},
通义API是有DashScope提供的,本身做了openai的接口兼容: https://help.aliyun.com/zh/dashscope/developer-reference/compatibility-of-openai-with-dashscope/?spm=a2c4g.11186623.0.i2
因此可以这样配置:
api_key获取说明文档:https://help.aliyun.com/zh/dashscope/developer-reference/activate-dashscope-and-create-an-api-key?spm=a2c4g.11186623.0.0.37913116wDxJop