This commit is contained in:
yoannchb-pro
2023-03-29 19:55:22 -04:00
parent 1770d044e5
commit 79eb20bcca
12 changed files with 91 additions and 35 deletions
+1 -2
View File
@@ -21,8 +21,7 @@ async function getChatGPTResponse(
},
signal: config.timeout ? controller.signal : null,
body: JSON.stringify({
model:
config.model && config.model !== "" ? config.model : "gpt-3.5-turbo",
model: config.model,
messages: [{ role: "user", content: question }],
temperature: 0.8,
top_p: 1.0,
+1 -5
View File
@@ -23,11 +23,7 @@ function normalizeQuestion(config: Config, questionContainer: HTMLElement) {
}
}
const finalQuestion = `Give a short response as possible for this question, reply in ${
config.langage && config.langage !== ""
? 'this langage "' + config.langage + '"'
: "the following question langage"
} and only show the result:
const finalQuestion = `Give a short response as possible for this question, reply in the following question langage and only show the result:
${question}
(If you have to choose between multiple results only show the corrects one, separate them with new line and take the same text as the question)`;
return normalizeText(finalQuestion);
-1
View File
@@ -1,7 +1,6 @@
type Config = {
apiKey: string;
code: string;
langage?: string;
model?: string;
infinite?: boolean;
typing?: boolean;