I want to do something like the following:
Bot: Want to answer some questions? User: Yes while continue: Bot: (fetches question from db and uses dispatcher.utter_message) User: (provides his answer) Bot: (stores answer) Bot: Want to answer another question? User: (provides his answer-> if intent affirm stay in loop; if intent deny leave loop) Bot: Thanks for your help!
I generally understand actions and formations but I can not bring them together for this loop. Can someone help me out?
I think my story should look like this:
- intent: something - action utter_want_to_answer_questions - intent: affirm - action: action_ask_question_form - active_loop: action_ask_question_form - intent: deny - action: action_deactivate_loop - active_loop: null
How does the
action_ask_question_form have to look like? I think I need two slots
answer but do I use the dispatcher in a form action and do I keep it running (setting
continue to None after I have stored the
answer in the db)?