Chat History Logger using Custom Tracker Store - Getting Started with Rasa / Tutorials, Resources & Videos - Rasa Community Forum

Chat History Logger using Custom Tracker Store

post by JiteshGaikwad on Oct 2, 2019

Hi all,

I have created a Chat history logger for logging the conversations to the JSON file using Custom Tracker Store.

You can get the code @ GitHub

Check out the sample JSON file here: sampleChatHistoryData.json

Hope it helps for those who want to log the conversations to the files.

post by akshay4malik on Jun 11, 2020

Hi Jitesh, I tried using your code. But it is not working. I have a question, you have provided url="", Should it be changed to action server url or to rasa bot url? and the issue is only when I am running it on server, On local machine it is working fine.

post by JiteshGaikwad on Jun 20, 2020

can you show me the error logs?

post by n-k-chilagani on Jun 23, 2020

Hi @JiteshGaikwad, I am trying to implement custom tracker store and while searching for tutorials I found two tutorials to implement custom tracker store. I tried this tutorial and it is throwing error UserWarning: Tracker store with type ‘myTracker.MyTrackerStore’ not found. Using InMemoryTrackerStore instead.

After surfing, I found that this issue can be resolved by setting the python path but, that didn’t help. I thought that my implementation was wrong so, I tried your method. It is still giving me the same error.

I am trying to implement CustomTrackerStore for storing just conversation of user and bot. I wrote the same endpoints.yml as you mentioned. Any help would be much appreciated. Thanks Nikhil

post by JiteshGaikwad on Jun 24, 2020

can you show me your project directory structure @n-k-chilagani

post by n-k-chilagani on Jun 24, 2020

Hi @JiteshGaikwad, here is my project directory

post by JiteshGaikwad on Jun 24, 2020

can you show me your endpoints.yml?

post by n-k-chilagani on Jun 24, 2020

I wrote just as you have mentioned in your github

post by JiteshGaikwad on Jun 24, 2020

@n-k-chilagani it should work as I have no set any path for the file and as it’s mentioned in the endpoints.yml, have you made any changes to chatHistoryLogger.py?

post by n-k-chilagani on Jun 24, 2020

@JiteshGaikwad Nope, I didn’t change anything in chatHistoryLogger.py. Do I need to run any command other than rasa run -m models --endpoints endpoints.yml --enable-api --cors “*” --debug?

post by JiteshGaikwad on Jun 24, 2020

should not be a problem, maybe you can try the below command:

rasa run -m models --enable-api --cors “*” --debug

post by n-k-chilagani on Jun 24, 2020

@JiteshGaikwad I tried both commands in the shell. Do we need to use any specific version of Rasa or OS? I am using 1.10.3 version of Rasa in Windows 10 OS.

post by JiteshGaikwad on Jun 24, 2020

no, it will work with that version.

post by n-k-chilagani on Jun 29, 2020

Hi @JiteshGaikwad, I reviewed my code again today and found out that I didn’t include chatLogger.py in my project folder.

rasa run -m models --enable-api --cors “*” --debug

I don’t know whether it is a bug or not. The above command does not show any import error in custom tracker files and it will directly configure to “InMemoryTrackerStore”. I solved the import issues by running python .py. Thanks for quick replies @JiteshGaikwad.

post by JiteshGaikwad on Jun 29, 2020

Thanks @n-k-chilagani for pointing out!

This is not a bug maybe you have missed the error trace, as it shows where the error occurred.

post by NgocNam1512 on Sep 3, 2020

I have the same error but the reason is not import chatLogger.py. I think we must create an __init__.py in the root folder and then the endpoint file can know where the CustomTracker file I define.

post by NgocNam1512 on Sep 3, 2020

If I’m not mistaken, you have a repo on Github about Rasa_deployment, it help me a lot. Thank you!

post by JiteshGaikwad on Dec 12, 2020

@NgocNam1512, I do have a repo Rasa_Deployment

post by anirudhudupa on Apr 18, 2021

Hi @JiteshGaikwad, Not able to find your repository in github as I’m also looking to implement the tracker store. Thanks, Anirudh