I am not able to view the database when I use redis tracker in rasa endpoints but when I use sqlite3 a database gets created of the full conversation.
Hi! Did you follow the steps here? Are you using Docker?
yes I did still not able no not using docker
Can you share how you’re connecting to the database? Do you know whether this connection is successful? Can you share how you’re reading/writing to the database?
Also, do you have a Redis server successfully setup? You can read more about setting up the server here on their documentation page.
yes it is showing connection is successful before I had sqlite3 but the database created over there is much more congested.
Do I need to write a separate python file for redis to store the database?
But did you have a successful connection with the redis database?
You don’t need a separate python file, but you do need a connection with a redis server. This is different from sqlite3, which is already installed on some OS, and writes to a local db file.
still not working
But did you have a successful connection with the redis database? Please answer this question so that I can help you. Please also share your code for connecting to the database.
Okay, can you share your code for connecting to the database and reading from the database? Do you get any error messages?
no I don’t get any error but I can’t find that .db file anywhere
Redis doesn’t write to a
.db file like sqlite does.
You could look for the snapshot file, by default this is a file named
dump.rdb, but it’s a binary file – meaning it won’t be readable in a normal text editor. In Ubuntu and other Linux distributions, the Redis database directory is
/var/lib/redis, if you can’t find it you can try
sudo locate *rdb.
However, I’m not sure what you’re trying to achieve. Can you read and write to the database without errors? Why do you want to look at a file?
I want to extract the chat the user had with the bot and send it to a customer rep can you help me in that and its not mandatory to use any particular database.
Which conversations do you want to extract? All of them? Can you just give the customer rep access to a database, or are you trying to get the conversations in a file?
I want to extract the conversation the user will have with the bot in the chatbot widget on server…and then extract the whole conversation and send it to a customer rep so that he can read the entire chat.
I should warn you that sending each conversation to a customer rep won’t scale to lots of users. A more scaleable solution would be to write the conversations to a database, and then set up a frontend for that database so that the customer rep can log in to the frontend and read the conversations. But setting up a frontend would be a bigger project, so you’ll have to think about your needs.
You could set up Rasa X, and give the customer rep a login. This way, they’ll be able to browse conversations. I strongly recommend you look into this, as it may work for your needs, and will be less difficult than building your own frontend, and scale better than sending conversations.
To send the conversations to a customer rep:
- write code to connect to a database (it sounds like you’ve already done this with Redis).
- write a custom action triggered at the end of each conversation to write the tracker store to the database.
- decide how frequently you want to send conversations to the rep. You could, for example, send the conversation as soon as it is done (again, this will not scale to lots of users), or you could send conversations at the end of the day. If you go for the end of the day, you’ll need to write a method that reads the database at the end of the day, and sends all the trackers from that day to the customer rep. You can look at the timestamps to see when the conversations took place. You may need to turn the trackers into a more human-readable format, you can write a python method to do this.
Thank you so much for suggesting it but how to convert that database into human readable format and can we implement rasa x as a widget on client server?