How to call custom action for all messages

Hi All

I want to call custom action in all of user messages. please tell me how to set config files.

Best Regards,

Can you elaborate what you want to do? Do you want to call one function for all messages or do you have an specific function for each intent?

Hi Gehova

Thanks for your response.

I want to call one function for all messages, When rasa received messages, always want to call custom action I created.

Regards

Just create the stories like `this:

## story 1
* intent_1
    - custom_action

## story 2
* intent_2
    -custom_action

This way rasa will learn to call your custom action for every intent you have.

1 Like

Hi Gehova

Thanks for you great response!

Please tell me how to write nlu.md ?
Is it OK below code ?

## intent_1
- custom_action

## intent_2
- custom_action

In the nlu file, you have example phrases you want to be converted into intents:

## intent_greeting
- hello
- hi
- howdy 
- wazzup
- morning
- greetings program
- top of the day
- watcha

## intent_farewell
- Bye
- cya
- see you later
- tiao
- bye bye
- goodbye
- adios
- catch you later

This defines the intents, that you use in your stories files. You have to declare just the intent names in the domain.yml file.

1 Like

Hi samscudder

Thanks for your response!
I solved my issue.

Best Regards