What purpose we use action.py file?

In my models folder I have different files along with those I also have actions.py and what is the exact use of this action.py file and when should we use it. I have gone through the document but I didn’t get exactly what it is.

File action.py code for your custom actions Please see the documentation in:

https://rasa.com/docs/rasa/user-guide/rasa-tutorial/

Actions are the things your bot runs in response to user input. There are four kinds of actions in Rasa:

  1. Utterance actions : start with utter_ and send a specific message to the user
  2. Retrieval actions : start with respond_ and send a message selected by a retrieval model
  3. :ballot_box_with_check: Custom actions : run arbitrary code and send any number of messages (or none).
  4. Default actions : e.g. action_listen , action_restart , action_default_fallback
1 Like