Storing the conversation as columns in database

Hi ,

I need help on below scenario,

User : I am sick

Chat bot : Please tell the problems you are facing… (*utter_asksymptoms)

User : I am having headache since yesterday

so i need to extract the entities from the above user response and store it in as separtae columns value in sql db table

pls help on how to do this

This can be done by using a custom action in which a query can be performed, which will insert a conversation. Check out the rasa’s Custom Action’s Page for more details. In your custom action, you will first connect to a DB and then insert the flow of conversation as a seperate query.

Thanks for the response ! when i browse through i got to know about tracker stores for storing converations , can you help me out on how to implement for my sql .

Sure!! Here is an example of MySQL call from rasa custom action.

Here, “varunsapre” is the username of mysql DB, “password” is password for the user, “rasadb” is the name of the DB.

tracker.get_slot() is used for getting a slot value. You will sure be able to save slot values in the DB, but i’m not sure how to do it for a whole sentence in the conversation.

Thanks ! Can you guide me on using sqltracker store pls .

I’m not very familiar but this is what i got to know. I’m not sure if this works because of SQLtracker store or not.

There is a table named “events” that exists in your DB which stores all the details about the conversations, as you can see in the image.

You can view the conversation details from here or by calling a custom action, where you can access the “events” table and the “text” parameter in the “data” column.

thanks for the reply !

Hi @divyakanniah, is the issue solved, if yes would you be kind enough to mark my previous reply as the solution, if not kindly update about the issue here.