How to start a rasa action in a rasa form

264 views Asked by At

Good morning all.

I would like to initiate an action in during the execution of my rasa form like

class HealthForm(FormAction):
            
            def name(self):
                return "health_form"
        
            @staticmethod
            def required_slots(tracker): 
    
    return ["confirm_exercise", "action_calculate", "sleep",
                 "diet", "stress", "goal"]
1

There are 1 answers

0
Christina Sebastian On

You would need to run two Terminals.

In First Terminal, you can run the "rasa shell" command and In Second Terminal you can run "rasa run actions" command

Then if you mentioned the form name "health_form" in the stories, it will get called.

Whenever you want to run the code written in actions.py file, make sure you run the "rasa run actions" in one of the terminal