i have a questions with chat-gpt-turbo
currently this is my implementation...
messages: [
{role: "system", content: "You are a helpful assistant."},
{role: "user", content: `${prompt}`}
],
lets say... all of the chat is stored in a database, should i include it on the api like this? because I am scared requesting lots of data to the api
const response = await openai.createChatCompletion({
model: "gpt-3.5-turbo",
messages: [
{role: "system", content: "You are a helpful assistant."},
//...old chat from database here
{role: "user", content: `${prompt}`}
],
temperature: 0.2,
max_tokens: 125,
top_p: 1,
frequency_penalty: 0,
presence_penalty: 0,
});
console.error(response.data.choices)
res.status(200).send({
bot: response.data.choices[0].message.content
});