Rasa form slot doesn't allow you to continue with the story unless the story intents are present in the slot mapping as not_intent=[intents]

I have the following story:

* complaint_status
   - complaint_status_form
   - slot{"requested_slot": "ComplaintNo"}
   - slot{"ComplaintNo": "123"}
   - slot{"requested_slot": "ComplaintNo"}
* stop
   - utter_ask_continue
* deny
   - action_deactivate_form
   - utter_default

If I have the following slot mapping:

"ComplaintNo": self.from_text(not_intent="stop")

Then saying “No” after “Stop”, Continues the form instead of deactivating it. However saying “Stop” after “Stop” does deactivate it even though there is no such story which had two stop intents.

If instead I have the following mapping:

"ComplaintNo": self.from_text(not_intent=["deny", "stop"])

Then the story works correctly and saying “Stop” followed by “No” upon the utter_ask_continue prompt and deactivates the FormAction.

Please tell me if I’m doing something wrong and help me fix it.

1 Like

well looks like you’ve solved it yourself, right?

1 Like

Yes. I didn’t notice that there was a story with two “stop” intents in my stories file. Also I realised from_text() ignores the “intent” detected unless specifically mentioned in the from_intent or not_intent parameters

1 Like