Using custom actions instead of utter_ask_{slot_name} in rasa 2.x

Is there a way to use a custom action instead of utter_ask_{slot_name} response? I know it used to be possible by changing request_next_slot, but what about the new version where we work with FormValidationAction instead of FormAction?

I think this ability to use a custom action instead of utter_ask_{slot_name} can be useful. For example, I want to ask different questions based on the value of other form slots.

if tracker.get_slot("other_slot_name") is not None:
       dispatcher.utter_message(text="text 1")
else:
       dispatcher.utter_message(text="text 2")
1 Like

Hi @z.fallahn

Just name your custom action action_ask_<form_name>_<slot_name> or action_ask_<slot_name>, as described here.

1 Like

Thanks.