Thank you @stephens
TL;DR
The solution was to add two FollowupAction
events and stories.
I’m probably not understanding Rasa very well, but as a new user I’d like to see an easier way to do do this if there was an event that could trigger a rule or intent directly. It appears that a couple actions being triggered allows a story to be used, which seems like a hack compared to triggering an intent or rule directly.
slot_events.append(FollowupAction(name="utter_hello_form"))
slot_events.append(FollowupAction(name="my_form"))
From the readme in my github repo demonstrating the issue you’ll see that the form works as expected when triggered from an intent retrieved from dialog, but not from a custom action.
I’ve used UserUttered to mock triggering the intent, and I’ve tried using a condition, slot is set to trigger the form. Neither seems to work.
I’ve demonstrated the issue and provided a complete config here. Unsure if this is a bug or an issue with my configuration of intents, slots, forms;… or something else.
GitHub - Hendler/rasa-form-from-custom-action
Filed a bug also Rasa 3 - form activation from custom action failing with several approaches · Issue #11049 · RasaHQ/rasa · GitHub
As a preview
The way I’m trying to do so is with simulating a user inent using UserUttered
:
slot_events = []
intent = {"intent": {"name": "activate_my_form", "confidence": 1.0}}
utter_event = UserUttered("Activate my form", intent)
slot_events.append(utter_event)
return slot_events
I have also tried this in the
slot_events.append(SlotSet(key="my_form_trigger", value=True))
I’ve read Rasa is not triggering the custom form action for example , Have problem Triggering rasa intents and custom actions in a independent program and many others.
I’m not sure where to focus in the logs or configs to understand the issue, as I’d expect the form to be activated:
- I see errors like
Circuit breaker tripped. Stopped predicting more actions for sender
There is no memorised next action
There is no trained model for 'ResponseSelector': The component is either not trained or didn't receive enough training data.
Action 'action_default_fallback' ended with events '[<rasa.shared.core.events.UserUtteranceReverted object at 0x1a7e4f850>]'.
-
rasa.core.policies.unexpected_intent_policy - Skipping predictions for UnexpecTEDIntentPolicy as either there is no event of type
UserUttered, event's intent is new and not in domain or there is an event of type
ActionExecutedafter the last
UserUttered.