I’m using Rasa 2.0 and have my form and slots defined in my domain.yml file.
I have custom form validation code to that conditionally sets the requested_slot
for my form. There are few mandatory questions, and a few conditional ones, depending on responses. This dictates the flow of questions and it all works fine.
I have also added a few rules for unhappy form paths… e.g. if someone asks for clarification. This works ok too.
The problem is when the wrong requested_slot is being set after recovering from the unhappy path. As far as I can gather, the reactivation of the form seems to ignore my custom logic, and uses the default. It looks like it will just pick the next undefined slot, as ordered by the definition of slots in my domain.yml.
Is there a way to maintain my requested_slot
value over the course of the unhappy path? How can I override this? It looks like the sort of thing that would be possible by overriding the FormAction logic, but I am told this method will be deprecated in future…
Here’s an example of one of my rules:
- rule: asks clarification instead of providing fundamentals
condition:
- active_loop: show_fundamentals_form
steps:
- intent: clarify #at this point the requested slot is an optional question e.g. "optional_slot_1"
- action: action_clarify_last
- action: show_fundamentals_form
- active_loop: show_fundamentals_form #at this point the form starts up, but with requested slot set to "mandatory_slot_1"