I have 3 variables feeding the conversation right now.
message is the user’s message coming from the frontend.
instructions is like “you are a chatbot”
metadata is the information I get back from pinecone related to a given question.
What would be a good place to insert a chat history array?
const result = await openai.chat.completions.create({
messages: [
{ role: “user”, content: message },
{ role: “system”, content: instructions },
{ role: “assistant”, content: metadataString },
],
model: “gpt-3.5-turbo”,
});