Skip to content

Commit

Permalink
fix(openai.js): move prepend to top of messages
Browse files Browse the repository at this point in the history
  • Loading branch information
supersonictw committed Jun 11, 2024
1 parent bd3b96e commit c31ad23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clients/openai.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ async function chatWithAI(chatId, prompt) {
const response = await client.chat.completions.create({
model: chatModel,
messages: [
...chatHistory,
...prependPrompts,
...chatHistory,
userPromptMessage,
],
});
Expand Down

0 comments on commit c31ad23

Please sign in to comment.