Hi,
Can anyone give me an example of how to use FollowUpAction in actions.py? I want to follow different stories if a specific slot has a specific value, and it was advised in this post to use FollowUpAction. How?
Hi,
Can anyone give me an example of how to use FollowUpAction in actions.py? I want to follow different stories if a specific slot has a specific value, and it was advised in this post to use FollowUpAction. How?
return [FollowupAction(action_name)]
thanks @ChrisRahme but I dont understand when I should use this? if I want a different story path when slot_1
is true, how and where do I return [FollowupAction(action_name)]
?
You return it at the end of your action, and it will execute action_name
, regardless of your stories.
FollowupAction
forces a given action to be executed.
@ChrisRahme I understand that thanks, but how do I then build the different stories based on the forced Action? do I need to manually include all of them in stories? Do you maybe have an example of usage of FollowupAction
? thx
It really depends on your use-case… If you feel it needs a story, then add one
If you want to execute an action after the followup action, you can either use another FollowupAction
, or use a story.
Best way to know is to try it yourself - and I suggest you use Interactive Learning