Hello RASA community, I have a problem where I the user to input two slots into a form. In the first slot called “vaccine”, the user is asked to choose from a list of vaccines using buttons. Next, the user should get information about his or her selected vaccine, followed by the second slot which is called “satisfaction”, where the system asks the user if he is satisfied with the answer he/she got. However, RASA tries to fill the slots first, giving me no room in stories.yml to execute an action in between these two slot fillings. utter_ask_<slot_name> also only has the option to specify text/buttons with payload and slots, but no way to specify an action that I want to execute in between. The relevant parts of domain and rules are as follows
utter_ask_vaccine:
- buttons:
- payload: /choose_vaccine{{“vaccine”:“az_vaccine”}} title: Astra Zeneca
- payload: /choose_vaccine{{“vaccine”:“moderna_vaccine”}} title: Moderna
- payload: /choose_vaccine{{“vaccine”:“biontech_vaccine”}} title: Biontech
- payload: /choose_vaccine{{“vaccine”:“sinopharm_vaccine?”}} title: Sinopharm text: Which vaccine are you interested in? utter_satisfication_end:
- text: Thank you for using the COVID chatbot. utter_ask_satisfaction:
- buttons:
- payload: /give_satisfaction{{“satisfaction”:“positive”}} title: Yes
- payload: /give_satisfaction{{“satisfaction”:“negative”}} title: No text: Is this what you wanted?
rules.yml
-
rule: Activate form steps:
- intent: access_summary_vaccine
- action: check_if_happy_form
- active_loop: check_if_happy_form
-
rule: Get satisfication condition:
Condition that form is active.
- active_loop: check_if_happy_form steps:
Form is deactivated
- action: check_if_happy_form
- active_loop: null
- slot_was_set:
- requested_slot: null
The actions we want to run when the form is submitted.
- action: action_access_summary_vaccine
- action: utter_satisfication_end
Can anyone help me here? Thank you!