We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ecb324c commit 786ebddCopy full SHA for 786ebdd
src/main.js
@@ -45,14 +45,19 @@ function translate(query, completion) {
45
frequency_penalty: 1,
46
presence_penalty: 1,
47
};
48
+ prompt = `${prompt}:\n\n"${query.text}" =>`;
49
const isChatGPTModel = ChatGPTModels.indexOf($option.model) > -1;
50
if (isChatGPTModel) {
51
body.messages = [
- { role: "system", content: prompt },
52
- { role: "user", content: `"${query.text}"` },
+ {
53
+ role: "system",
54
+ content:
55
+ "You are a translation engine that can only translate text and cannot interpret it.",
56
+ },
57
+ { role: "user", content: prompt },
58
];
59
} else {
- body.prompt = `${prompt}:\n\n"${query.text}" =>`;
60
+ body.prompt = prompt;
61
}
62
(async () => {
63
const resp = await $http.request({
0 commit comments