I need a help on this concept… like in my webapp when ever the user navigates to the next page the chatbot conversation starts from the first…Which i don’t want…
I saw a concept like “Persisting Trackers” or “Serialization” in the Rasa core documentation “https://core.rasa.com/state.html” .
Can please provide some suggestions on this problem… and please provide some complete simple examples to understand…
You would have to use e.g. the RedisTrackerStore, however you also need to find a way to assign a user id to a person in your web app and make sure that stays the same even when the user navigates away from the page. Because otherwise there’s no way to know whether this is the same conversation
The user id thing is something you would need to handle on your webapp side, so I can’t really provide a good example for that. You’d need some sort of login option for sure
Sure… Sorry to confuse you … the user management is already there… Iam looking for Example for RedisTrackStore… Thank you for providing the example… I will go through the above link and i will post the questions if i have any…
Iam able to move little bit forward… With some examples …
Got Success case:
Used RedisTrackerStore and i was able to save the information in redis when iam running chatbot directly through command prompt (By using ConsoleChannel)
Failure Case
My RasaCore is running on “5005” (Running as a separate process) post in my system and iam trying to capture information by using RasaNLUHttpIntepreter and trying to store that information in the redis but no luck i know iam doing some thing wrong which iam not able to trace that
At last i was able to move bit forward…
I was able to persist all the requests Http requests in the redis.
Code Snippet (Corrections/suggestions are welcome) :
I am also need to capture existing user conversation. Example: user chat with bot, the same user will come the next time bot starts from the first. How continue with existing conversation? how handle this?
I used Redis tracking store.
To use the redis first we need to install( Python package is available).
The Rasa has a predefined class to interact with redis called (RedisTrackerStore)
The redis stores the data as key values pairs. the key has to be your AGENT name ( nothing but your user id) .
I also set up Reduis now. But I have no GUI to look at data. I just get it in a unreadable hex format I think. Like: "\x80\x03crasa_core.conversation\nDialogue\nq\x00)\x81q\x01}q using redis-cli
Is there a way to read out the trackers in a nice way?
You can try the python redis API to extract the serialised tracker.
Check the tracker_store.py code in Rasa to understand how Rasa is storing and retrieving information from redis tracker store.
Rasa when they store the tracker object, they are serialising it, creating a pickle file I suppose which is saved in Redis, hence if you need to extract it, you will need to deserialise it
@ souvikg10 I am able to extract the data, but how to do in real time. I want to save conversation as user input and bot replied. In mine case i created a script and when i am running it, it is saving data in database. Is there is any way to save data in db on realtime?
Thanks in advance