Need help,about Custom Action use as a Fallback Action

rasa-core
(Yu) #1

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!!!

(Vladimir Vlasov) #2

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'
(Yu) #3

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

(Vladimir Vlasov) #4

sorry, I don’t understand what you mean

(Visa) #5

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

python3 -m rasa_core.run --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.

(Akshit) #6

Why are you running policy with rasa_core.run? 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/stories.md -c policy.yml -o models/dialogue

then for running:

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

(Visa) #7

Sure, got it! Thanks Akshit

1 Like