Open ClemB-Dev opened 1 month ago
In theory you should be able to call response.create.item with each one of the previous messages, but I couldn't make it work, I'm creating an issue about it in a sec.
So what I did was:
let instructionsCopy = instructions;
if (messageList.length > 0) {
instructionsCopy = instructionsCopy + `\n\nThe following is a history of our previous conversation:\n${messageList.map(message => `${message.sender}: ${message.message}`).join('\n')}`;
}
Thank you for answering. That's also what I did on my side.
I was wondering how I could populate the RealTime Client with a conversation history.
The idea is that users can continue a conversation from where it left off after being disconnected. I am already able to retrieve the history, as I have saved it in a database. Now, I would like to configure the client with the updated history.
Is this possible? If so, how does it work?