mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-29 16:44:13 +08:00
.
This commit is contained in:
parent
a2ff34e0fe
commit
4c5f7bc575
@ -58,16 +58,22 @@ class gptcommon(basetrans):
|
|||||||
# 傻逼豆包大模型是非要v3,不是v1
|
# 傻逼豆包大模型是非要v3,不是v1
|
||||||
if api_url.endswith("/v3"):
|
if api_url.endswith("/v3"):
|
||||||
return api_url
|
return api_url
|
||||||
|
elif api_url.endswith("/v3/"):
|
||||||
if api_url.endswith("/v1/"):
|
return api_url[:-1]
|
||||||
api_url = api_url[:-1]
|
# 智谱AI
|
||||||
elif api_url.endswith("/v1"):
|
elif api_url.endswith("/v4"):
|
||||||
pass
|
|
||||||
elif api_url.endswith("/"):
|
|
||||||
api_url += "v1"
|
|
||||||
else:
|
|
||||||
api_url += "/v1"
|
|
||||||
return api_url
|
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):
|
def commonparseresponse(self, query, response: requests.ResponseBase, usingstream):
|
||||||
if usingstream:
|
if usingstream:
|
||||||
|
@ -26,6 +26,19 @@
|
|||||||
|
|
||||||
![img](https://image.lunatranslator.xyz/zh/damoxing/doubao.png)
|
![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 -->
|
<!-- tabs:end -->
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user