I am trying to exit a form loop if a specific intent is responded to the first question. It’s an edge case and if the first response is a particular one, I want to deactivate the form and take a different path.
According to all the docs, I’ve done it correctly.
It correct detected the edge case intent I am looking for, but then continues with wanting to execute the form and doesn’t go to my alternative path.
- active_loop: seller_form # the form
- slot_was_set:
- requested_slot: seller_time_frame #the first questions
- intent: seller_already_listed #user response is an edge case that I want to detect
- action: action_deactivate_loop # deactivate the current loop
- active_loop: null # no current loops running.
- slot_was_set:
- requested_slot: null #no more questions
- action: utter_ask_wants_free_valuation #ulterior action path based on detecting seller_already_listed
- intent: affirm # cont..
- action: completed_happy_goodbye # cont..
As I mentioned… interactive sessions shows that it detected the correct intent “seller_already_listed” but continue to loop through seller form.
The only material difference I can see with your config and mine is that I have the requested slot directives (i also added in some or: intents for good measure)
I’ve removed the now and the stories read as follows:
But its always forcing the next question in the seller form - even when it detects the seller_already_listed intent.
In the interactive sessions - when I correct the “seller_form” action and tell it to deactivate_loop instead, it works well from there… so it feels like thats the bit that isn’t being picked up and if it could figure out how to deactivate the loop it’d all work fine…
I havent - but its detecting the right intent anyhow so adding a “not intent” should be a mute point right? I’ll try it in my next build and see how that goes.
I did a small unit test and it appears to work after removing this rule
- rule: seller_already_listed always deactivates seller form and asks if they want a free valuation
condition:
- active_loop: seller_form # this form must be active
steps:
- action: seller_already_listed
- active_loop: null # the form is no longer active because it has been filled
- slot_was_set:
- requested_slot: null
- action: utter_ask_wants_free_valuation
doing a full rebuild now - fingers crossed - thanks for your help (regardless of outcome!)