I am using Rasa 2.8.15. I have a Form and using action.py to validate slots. For one of them, if intent == 'affirm', I want to trigger a FollowupAction() event. However because it is a slot validation method the returned object needs to be defined as a dictionary… how can I do it?
thanks for suggesting @ChrisRahme. I dont understand how you can set "followup": action_name if the action_name has not been defined in the validation function? I also dont understand how the action gets executed if the return [ ] is empty? With your stories an action gets executed and I get out of the form, which I dont want to happen. I would like an action to be executed if an intent is recognized, and then keep filling the Form slots… let me know thanks
thanks for suggesting @ChrisRahme very helpful.
I think I have not been very clear, apologies. Your suggestion above will make the bot say 'Write your action here'in case the "followup" slot has a value of 'action_test'… but no custom action () gets executed if I understand correctly? The bot would then ask the user to fill the next domain_slot, instead of reacting to user response to the Action, right? I dont understand how to execute the action from the required_slots()?
I will try to see if it works, thanks. My only concern is: the 'action_get_weather' gets triggered (meaning, bot says 'The temperature is {temperature} degrees in {location}.', and the user is not able to reply and have a different conversation flow, because we are including just the utter_message but the bot does not wait for user reply, it will prompt with the utter_next_slot (i mean the next slot to be filled).
Isn’t that what you want? You said yourself that the form should continue.
Anyway, I gave you all the basic possibilities. Try to learn by yourself and mix what I taught you according to your needs.
For example, you could execute that “action” in the required_slots method and return [], then go back to the form using a story…
There are so many possibilities, I will not and cannot showcase them all here - especially that you did not specify your use case, so there are lots of ways to interpret what you want to do.
Anyway, I gave you the building blocks and logic, you should be able to learn and modify this info according to your needs.