Hey everyone, I need help with executing an action with a custom action. Is it possible ?
@Venkat check FollowAction Ref: Events | Events
return [FollowupAction(“action_current_date”), FollowupAction(“action_time”)]
Good Luck! Hope this will help.
@nik202 Can you give an example , because I have never used followups
in follow-up action the action given as the follow-up will be executed after a defined function but I want it to executed after an if statement
You can only execute an action after a whole action completed.
Do you want to continue the code after the if
statement?
- If yes, then just duplicate the code into the new action (or preferably write a function)
- If not, then you can
return [FollowupAction(action_name)]
inside theif
@ChrisRahme but ,what is the syntax that should be used to run the specified action
As mentioned previously by Nik and I,
return [FollowupAction("action_name")]
@ChrisRahme will this work tracker.followup_action("action_name")
Where did you get that syntax?
Please check the tracker docs to see available options for the tracker.
@ChrisRahme I got it here Action latest_action_name, followup_action, latest_input_channel return none - Rasa Open Source - Rasa Community Forum
@Venkat check this thread may be this will help you: https://github.com/RasaHQ/rasa-sdk/issues/120
Wow, that thread is almost 3 years old, be careful
@ChrisRahme seems like this method would work , Have to check the source code of rasa core
@nik202 Thank you very much for the suggestion
@nik202 I tried out nik’s method in interactive training and the bot recognizes the action but it doesn’t give out any output and to be specific I’m trying to execute a custom action with a custom action will this work
@Venkat its ok please see this thread of discussion:How to call custom action from another custom action - #10 by saurabh-m523