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:

I shared Rasa chat with in LAN with my friends but after chat I couldn’t see their chat conversations in Rasa X conversations , how to find those or where are they located?

Hi @Tanja ,

As you have mentioned that, currently it is not possible to write the chat history in a .txt file. We just have the log file.

May I please know how can i get the log file which contains the conversation history?

Thanks, Anjali

1 Like

Do you have any material to look into to understand how to save the chat logs in a snowflake database? @Tanja