Ok so I can include an array of questions and responses inside the messages: array of the chat.completions.create({}) object… cool…
Now, what would be role of the bot himself when I add the array of the conversation history?
^^^ I ask this because I am also working with documentation coming back from pinecone embedding responses… and wouldn’t the feedback from pinecone be included in the “assistant” role?
So far the code looks like this:
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”,
max_tokens: 150,
Temperature: 0.3,
});
where:
message is the input from the user… “how are you doing today Mr. bot?”
system is the instructions given to the bot… “you are an assistant bot”
assistant is where I include the feedback from pinecone “here is what I got back from the embedding”
Now… under what role this below would go???
console.log(result.choices[0].message.content);