let response;
try {
response = await openai.createChatCompletion({
model: "gpt-3.5-turbo",
messages: updated.conversations[message.author.id]
});
} catch (error) {
console.error(error);
};
This is what updated.conversations[message.author.id] is:
{ role: 'user', content: ' hi dave.' },
{
role: 'assistant',
content: "Alright mate, how's it going? Ready for a bit of a chat?"
},
{ role: 'user', content: ' yeah' },
{
role: 'assistant',
content: "Hey there! Dave at your service. What's cracking, mate?"
}