History for my chatbot

i want to create a history for my chatbot so i can retrieve old conversations just like in chatgpt

You could use one of the tracker, such as mongo tracker. Tracker contains the conversation of the session and you could retrieve the conversation from mongoDB and use it to display your previous conversation

1 Like

Hi!

I have a similar question. I tried using SQLTrackerStore but it only saves intent_name and action_name. I want to save the exact messages users write and the bot’s response. Is there a way to do this? For example, is there a way to log users’ messages to the console? I use Rasa open source. Thank you.

1 Like

I think every tracker stores the entire record for the conversation, Not just the intent and action name. You could try checking the SQLTrackerStore class in Rasa for more info.

By default, Events contains all the steps involved in the conversation, You can extract your conversation from there.

1 Like

i did the conection to mangodb and i got the data in this form image

and i think that it s storing only the last msg i sent

Hi @juvia

You can find all the conversation in events array, extract out the text field and message type: user or bot from that array and you’ll have your entire conversation.

am not able to retrive the conversation i stored it in mangodb and y goal is to display a conversation stored in a mango document with the click of a js button

To display the conversation, You’ll have to connect to the DB and then once the conversation object is fetched for the senderID, You’ll have to do some preprocessing in the events array. It contains every part of the conversation. Iterate over the events array and extract the text.