Store RASA chat history in local file system

I am using RASA to built a chat bot. I want to store the chat history in the local file system as a text file but i am not able to do that. I searched and found that i can store the chat history in Mongodb, Redis and SQL however i want to store the data in .txt file in local file system how can i do that. Please help

I am getting the entire output in logs but i want the results to be a little bit structured.

@indranil180 You are right, currently it is not possible to write the chat history in a .txt file. We just have the log file.

I guess, you can achieve that by writing your own custom tracker store (documentation: Tracker Stores). I would suggest adapting the InMemoryTrackerStore (code: rasa/tracker_store.py at master · RasaHQ/rasa · GitHub) to write the current message into a file on every save. You can retrieve the current state of the tracker by calling tracker.current_state(). By doing this, you can also decide on the format yourself. Hope that helps.

1 Like

Thanks :slightly_smiling_face: