Need help,about Custom Action use as a Fallback Action

location: rasa_core. doc. Fallback Action . Note. You can also create your own custom action to use as a fallback." detail: “You can also create your own custom action to use as a fallback. Be aware that if this action does not return a UserUtteranceReverted event, the next predictions of your bot may become inaccurate, as it very likely that the fallback action is not present in your stories”

My question is :
do i have to write a policy to train “the custom action to use as a fallback”? If so, how? i have no idea about how to write one. Greet thanks!!!

You can pass the name of your custom action to FallbackPolicy in policy config file (Training and Policies):

- name: FallbackPolicy
    fallback_action_name: 'your_custom_fallback_action_name'

But, the FallbackPolicy is not what i want my_custom_action_as_fallback_action to do. i don`t want to do fall back, i want do something else. such as , such as whenever get a “repeat” intent, do repeat_ latest_bot_utterance action. Can you help me??? @Ghostvv

sorry, I don’t understand what you mean

When I have fallback action - custom action, I am using teh below command in terminal:

python3 -m --core models/dialogue --nlu models/nlu/default/faq_bot --debug-c policies.yml

and its giving me the error:

Exception: Failed to find input channel class for ‘policies.yml’. Unknown input channel. Check your credentials configuration to make sure the mentioned channel is not misspelled. If you are creating your own channel, make sure it is a proper name of a class in a module.

Why are you running policy with You have to run policy at the time of training. try this: First train your model:

python3 -m rasa_core.train -d domain.yml -s data/ -c policy.yml -o models/dialogue

then for running:

python3 -m -d models/dialogue -u models/nlu/default/faq_bot --debug --endpoints endpoints.yml

Sure, got it! Thanks Akshit

1 Like