How can we store multiple slot values in MongoDB?

  • get_tirelocation{“tirelocation”: “Left Rear Tire”}
    • slot{“tirelocation”: “Left Rear Tire”}
    • utter_tirecause
  • get_tirecause{“tirecause”: “Kerb”}
    • slot{“tirecause”: “Kerb”}
    • utter_tiredamagedesc
  • get_tiredamagedesc{“tiredamagedesc”: “Bubble”}
    • slot{“tiredamagedesc”: “Bubble”}
    • utter_tiredamageloc
  • get_tiredamageloc{“tiredamageloc”: “Sidewall”}
    • slot{“tiredamageloc”: “Sidewall”}
    • utter_leak

This is a small part of my stories.md , the above conversation happens to be in loop if user adds another tire. My problem is MongoDB is storing only single value of slots and when the conversation cycle repeats for another tire ,slot values are updated to latest slot selection. I also tried putting slots as lists but still the problem persists.

Can anyone help me out? @Juste @akelad @JulianGerhard

Thanks and Regards, Ayush

Hi @heyitsayush would you not want to store this information in a database related to your application? Or send the information off to an API to do something with it? Rasa stores slot information for context of a conversation, it is not designed to persist this information for users for ever.

If you do want to use list slots though, you have to append to the list in a custom action.

1 Like