You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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')}`;
}
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?
The text was updated successfully, but these errors were encountered: