Skip to content

Commit

Permalink
✨feature(prompt): 增加自定义prompt功能
Browse files Browse the repository at this point in the history
  • Loading branch information
vacuityv committed Jun 13, 2024
1 parent 268c977 commit 1305efa
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
8 changes: 4 additions & 4 deletions appcast.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"identifier": "me.vacuity.chat.gptranslate",
"versions": [
{
"version": "1.3.6",
"desc": "https://github.com/vacuityv/bob-plugin-vac-gptranslate/releases/tag/1.3.6",
"sha256": "6630c210f40d4711b37f6c8dbdca63584599451877e04539b2e381760725c77d",
"url": "https://github.com/vacuityv/bob-plugin-vac-gptranslate/releases/download/1.3.6/bob-plugin-vac-gptranslate.bobplugin",
"version": "1.3.7",
"desc": "https://github.com/vacuityv/bob-plugin-vac-gptranslate/releases/tag/1.3.7",
"sha256": "5cdecbd8ed3db9266ce689e770454a8d40d4300619155730146ea903b2e3c20d",
"url": "https://github.com/vacuityv/bob-plugin-vac-gptranslate/releases/download/1.3.7/bob-plugin-vac-gptranslate.bobplugin",
"minBobVersion": "0.5.0"
}
]
Expand Down
12 changes: 11 additions & 1 deletion info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"identifier": "me.vacuity.chat.gptranslate",
"version": "1.3.6",
"version": "1.3.7",
"category": "translate",
"name": "GPTranslate",
"summary": "调用chatgpt/gemini/claude实现翻译功能",
Expand Down Expand Up @@ -75,6 +75,16 @@
"value": "y"
}
]
},
{
"identifier": "prompt",
"type": "text",
"title": "prompt",
"textConfig": {
"type": "visible",
"height": 60,
"placeholderText": "请输入您自定义的prompt(如果你不知道prompt是什么,请不要输入)"
}
}
]
}
4 changes: 3 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,16 @@ function initReqBody(query) {
var account = $option.loginAccount;
var password = $option.loginPassword;
var modelType = $option.modelType;
var prompt = $option.prompt;
var content = query['text'];
return {
email: account,
password: password,
content: content,
modelType: modelType,
targetLanguage: langMap[query['to']],
translateFrom: 'bob'
translateFrom: 'bob',
prompt: prompt
};
}

0 comments on commit 1305efa

Please sign in to comment.