This commit is contained in:
恍兮惚兮 2024-07-20 14:58:04 +08:00
parent a2ff34e0fe
commit 4c5f7bc575
2 changed files with 26 additions and 7 deletions

View File

@ -58,16 +58,22 @@ class gptcommon(basetrans):
# 傻逼豆包大模型是非要v3不是v1
if api_url.endswith("/v3"):
return api_url
if api_url.endswith("/v1/"):
api_url = api_url[:-1]
elif api_url.endswith("/v1"):
pass
elif api_url.endswith("/"):
api_url += "v1"
else:
api_url += "/v1"
elif api_url.endswith("/v3/"):
return api_url[:-1]
# 智谱AI
elif api_url.endswith("/v4"):
return api_url
elif api_url.endswith("/v4/"):
return api_url[:-1]
# 正常的
elif api_url.endswith("/v1"):
return api_url
elif api_url.endswith("/v1/"):
return api_url[:-1]
elif api_url.endswith("/"):
return api_url + "v1"
else:
return api_url + "/v1"
def commonparseresponse(self, query, response: requests.ResponseBase, usingstream):
if usingstream:

View File

@ -26,6 +26,19 @@
![img](https://image.lunatranslator.xyz/zh/damoxing/doubao.png)
### **月之暗面**
**API接口地址** `https://api.moonshot.cn`
### **智谱AI**
**API接口地址** `https://open.bigmodel.cn/api/paas/v4/chat/completions`
### **零一万物**
**API接口地址** `https://api.lingyiwanwu.com`
<!-- tabs:end -->
<details>