mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-28 08:04:13 +08:00
dev
This commit is contained in:
parent
c75cd26978
commit
00c51002e0
@ -63,7 +63,7 @@ def loadvisinternal(btnplus, copy):
|
|||||||
is_gpt_likes, not_is_gpt_like = splitapillm(shoufei)
|
is_gpt_likes, not_is_gpt_like = splitapillm(shoufei)
|
||||||
elif btnplus == "offline":
|
elif btnplus == "offline":
|
||||||
is_gpt_likes, not_is_gpt_like = splitapillm(lixians)
|
is_gpt_likes, not_is_gpt_like = splitapillm(lixians)
|
||||||
elif btnplus == "develop":
|
elif btnplus == "dev":
|
||||||
is_gpt_likes, not_is_gpt_like = splitapillm(develop)
|
is_gpt_likes, not_is_gpt_like = splitapillm(develop)
|
||||||
|
|
||||||
for _ in is_gpt_likes:
|
for _ in is_gpt_likes:
|
||||||
@ -289,7 +289,7 @@ def createmanybtn(self, countnum, btnplus):
|
|||||||
dynamiclink("{docs_server}/#/zh/guochandamoxing")
|
dynamiclink("{docs_server}/#/zh/guochandamoxing")
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
elif btnplus == "develop":
|
elif btnplus == "dev":
|
||||||
btn.clicked.connect(
|
btn.clicked.connect(
|
||||||
lambda: gobject.baseobject.openlink(
|
lambda: gobject.baseobject.openlink(
|
||||||
dynamiclink("{docs_server}/#/zh/tiaoshiliulanqi")
|
dynamiclink("{docs_server}/#/zh/tiaoshiliulanqi")
|
||||||
@ -548,7 +548,7 @@ def setTabTwo_lazy(self, basel):
|
|||||||
|
|
||||||
offlinegrid = initsome2(self, lixians, btnplus="offline")
|
offlinegrid = initsome2(self, lixians, btnplus="offline")
|
||||||
onlinegrid = initsome11(self, mianfei)
|
onlinegrid = initsome11(self, mianfei)
|
||||||
developgrid += initsome2(self, develop, btnplus="develop")
|
developgrid += initsome2(self, develop, btnplus="dev")
|
||||||
online_reg_grid += initsome2(self, shoufei, btnplus="api")
|
online_reg_grid += initsome2(self, shoufei, btnplus="api")
|
||||||
pretransgrid += initsome11(self, pre)
|
pretransgrid += initsome11(self, pre)
|
||||||
vw, vl = getvboxwidget()
|
vw, vl = getvboxwidget()
|
||||||
|
10
LunaTranslator/LunaTranslator/translator/dev_duckduckgo.py
Normal file
10
LunaTranslator/LunaTranslator/translator/dev_duckduckgo.py
Normal 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"]'
|
@ -1647,6 +1647,13 @@
|
|||||||
"name": "chatgpt",
|
"name": "chatgpt",
|
||||||
"is_gpt_like": true
|
"is_gpt_like": true
|
||||||
},
|
},
|
||||||
|
"dev_duckduckgo": {
|
||||||
|
"use": false,
|
||||||
|
"color": "blue",
|
||||||
|
"type": "dev",
|
||||||
|
"name": "DuckDuckGo",
|
||||||
|
"is_gpt_like": true
|
||||||
|
},
|
||||||
"dev_theb": {
|
"dev_theb": {
|
||||||
"use": false,
|
"use": false,
|
||||||
"color": "blue",
|
"color": "blue",
|
||||||
|
@ -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": {
|
"dev_theb": {
|
||||||
"args": {
|
"args": {
|
||||||
"usingstream": true,
|
"usingstream": true,
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
|
|
||||||
- **离线翻译** 支持 **传统翻译** ( J北京7、金山快译、译典通、ezTrans、Sugoi、MT5 ) 和离线部署的 **大模型翻译** ( ChatGPT兼容接口、Sakura大模型 )
|
- **离线翻译** 支持 **传统翻译** ( 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 )
|
||||||
|
|
||||||
- **预翻译** 支持读取预翻译文件,支持翻译缓存
|
- **预翻译** 支持读取预翻译文件,支持翻译缓存
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user