I have a form that allows a user to search for items in a library. The final slot in the form is called ‘give_suggestion’, and if set to True, I want the current form to deactivate, and a separate form to be activated to allow the user to give a library suggestion.
I have tried this, but with no luck:
- rule: Activate Suggestion form if search library form ends in suggestion
condition:
- active_loop: search_library_form
steps:
- action: search_library_form
- active_loop: null
- slot_was_set:
- give_suggestion: True
- slot_was_set:
- requested_slot: null
- action: action_search_library_form_reset
- action: suggestion_form
- active_loop: suggestion_form
I also have a separate activation rule for the suggestion form, since should also be possible to activate it separately:
- rule: Activate Suggestion Form
steps:
- action: utter_suggestion_form
- intent: affirm
- action: suggestion_form
- active_loop: suggestion_form
And there is also a rule for submitting the search library form if the user does not want to submit a suggestion:
- rule: Submit Search String Form
condition:
- active_loop: search_library_form
steps:
- action: search_library_form
- active_loop: null
- slot_was_set:
- give_suggestion: False
- slot_was_set:
- requested_slot: null
- action: action_search_library_form_reset
- action: utter_anything_else
Does anyone know how I can implement this to allow the Suggestion form to be activated after the Search library form only if the give_suggestion slot is set to True?