aboutsummaryrefslogtreecommitdiff
path: root/src/client/apis/gpt/GPT.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/apis/gpt/GPT.ts')
-rw-r--r--src/client/apis/gpt/GPT.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/apis/gpt/GPT.ts b/src/client/apis/gpt/GPT.ts
index 2de87586b..8747a00a6 100644
--- a/src/client/apis/gpt/GPT.ts
+++ b/src/client/apis/gpt/GPT.ts
@@ -45,7 +45,7 @@ const gptAPICall = async (inputText: string, callType: GPTCallType, prompt?: any
};
const openai = new OpenAI(configuration);
- let usePrompt = prompt? opts.prompt+prompt: opts.prompt;
+ let usePrompt = prompt ? opts.prompt + prompt : opts.prompt;
let messages: ChatCompletionMessageParam[] = [
{ role: 'system', content: usePrompt },
{ role: 'user', content: inputText },
@@ -53,9 +53,9 @@ const gptAPICall = async (inputText: string, callType: GPTCallType, prompt?: any
const response = await openai.chat.completions.create({
model: opts.model,
- messages: messages,
- temperature: opts.temp,
max_tokens: opts.maxTokens,
+ temperature: opts.temp,
+ messages,
});
const content = response.choices[0].message.content;
return content;