agreeable-accountant-7248
03/29/2024, 7:07 PMconst productInfo = []
const chatCohereUser =
{
role: "User",
message: workflow.pregDirectaCohere
}
const chatCohereChatbot =
{
role: "Chatbot",
message: workflow.respuestaCohere
}
productInfo.push(chatCohereUser,chatCohereChatbot)
How could I create an array of objects that could store new objects in each interaction between user and chatbot? In the actual solutions it stores only the last user and chatbot message but I need to store all the conversation in an array of objects.
Thanks in advance!!