diff --git a/src/info.json b/src/info.json index 75517bd..3abef97 100644 --- a/src/info.json +++ b/src/info.json @@ -47,6 +47,13 @@ } ] }, + { + "identifier": "prompt", + "type": "text", + "title": "Prompt", + "defaultValue": "Revise the following sentences to make them more clear, concise, and coherent", + "desc": "通过自定义 prompt 获取不同的润色结果" + }, { "identifier": "polishing_mode", "type": "menu", diff --git a/src/main.js b/src/main.js index 86d928f..f6658d5 100644 --- a/src/main.js +++ b/src/main.js @@ -13,8 +13,7 @@ function translate(query, completion) { Authorization: `Bearer ${api_key}`, }; const detailedPolishingMode = $option.polishing_mode === "detailed"; - let prompt = - "Revise the following sentences to make them more clear, concise, and coherent"; + let prompt = $option.prompt; if (detailedPolishingMode) { prompt = `${prompt}. Please note that you need to list the changes and briefly explain why`; }