is it possible to ask questions dynamically, dependent on the previous reply.
please elaborate
If you mean using FormAction
just give RANDOMIZE = True
class ActionSearchRestaurants(FormAction):
RANDOMIZE = True
@staticmethod
def required_fields():
return [
EntityFormField("cuisine", "cuisine"),
EntityFormField("number", "people"),
BooleanFormField("vegetarian", "affirm", "deny")
]
def name(self):
return 'action_search_restaurants'
def submit(self, dispatcher, tracker, domain):
results = RestaurantAPI().search(
tracker.get_slot("cuisine"),
tracker.get_slot("people"),
tracker.get_slot("vegetarian"))
return [SlotSet("search_results", results)]