This commit is contained in:
恍兮惚兮 2024-09-13 13:17:57 +08:00
parent c75cd26978
commit 00c51002e0
5 changed files with 39 additions and 4 deletions

View File

@ -63,7 +63,7 @@ def loadvisinternal(btnplus, copy):
is_gpt_likes, not_is_gpt_like = splitapillm(shoufei)
elif btnplus == "offline":
is_gpt_likes, not_is_gpt_like = splitapillm(lixians)
elif btnplus == "develop":
elif btnplus == "dev":
is_gpt_likes, not_is_gpt_like = splitapillm(develop)
for _ in is_gpt_likes:
@ -289,7 +289,7 @@ def createmanybtn(self, countnum, btnplus):
dynamiclink("{docs_server}/#/zh/guochandamoxing")
)
)
elif btnplus == "develop":
elif btnplus == "dev":
btn.clicked.connect(
lambda: gobject.baseobject.openlink(
dynamiclink("{docs_server}/#/zh/tiaoshiliulanqi")
@ -548,7 +548,7 @@ def setTabTwo_lazy(self, basel):
offlinegrid = initsome2(self, lixians, btnplus="offline")
onlinegrid = initsome11(self, mianfei)
developgrid += initsome2(self, develop, btnplus="develop")
developgrid += initsome2(self, develop, btnplus="dev")
online_reg_grid += initsome2(self, shoufei, btnplus="api")
pretransgrid += initsome11(self, pre)
vw, vl = getvboxwidget()

View File

@ -0,0 +1,10 @@
from translator.dev_llm_common import commonllmdev
class TS(commonllmdev):
target_url = "https://duckduckgo.com/?t=h_&q=hi&ia=chat"
jsfile = "commonhookfetchstream.js"
function1 = 'url.includes("duckchat/v1/chat")'
function2 = r"""thistext += (chunk.message?chunk.message:"")"""
textarea_selector = 'textarea[name="user-prompt"]'
button_selector = 'button[type="submit"]'

View File

@ -1647,6 +1647,13 @@
"name": "chatgpt",
"is_gpt_like": true
},
"dev_duckduckgo": {
"use": false,
"color": "blue",
"type": "dev",
"name": "DuckDuckGo",
"is_gpt_like": true
},
"dev_theb": {
"use": false,
"color": "blue",

View File

@ -798,6 +798,24 @@
}
}
},
"dev_duckduckgo": {
"args": {
"usingstream": true,
"use_custom_prompt": false,
"custom_prompt": ""
},
"argstype": {
"usingstream": {
"name": "流式输出",
"type": "switch"
},
"custom_prompt": {
"name": "自定义_promt",
"type": "multiline",
"refswitch": "use_custom_prompt"
}
}
},
"dev_theb": {
"args": {
"usingstream": true,

View File

@ -36,7 +36,7 @@
- **离线翻译** 支持 **传统翻译** ( J北京7、金山快译、译典通、ezTrans、Sugoi、MT5 ) 和离线部署的 **大模型翻译** ( ChatGPT兼容接口、Sakura大模型 )
- **Chrome调试翻译** 支持 **传统翻译** ( deepl、yandex、有道、百度、腾讯、必应、彩云、小牛、阿里、谷歌 ) 和 **大模型翻译** ( chatgpt、deepseek、moonshot、qianwen、chatglm、Theb.ai )
- **Chrome调试翻译** 支持 **传统翻译** ( deepl、yandex、有道、百度、腾讯、必应、彩云、小牛、阿里、谷歌 ) 和 **大模型翻译** ( chatgpt、deepseek、moonshot、qianwen、chatglm、Theb.ai、DuckDuckGo )
- **预翻译** 支持读取预翻译文件,支持翻译缓存