Hey all,
I’m working on a sample conversational chatbot with Rasa 1.0.6 (i.e., training and everything is done on the command line, with only a single custom action as a custom .py script). Everything is working as intended, except for the fallback action. It’s defined in the config file, which is as follows:
config.yml
language: "en"
pipeline:
- name: “SpacyNLP” # loads the spacy language model
- name: “SpacyTokenizer” # splits the sentence into tokens
- name: “CRFEntityExtractor” # uses the pretrained spacy NER model
- name: “SpacyFeaturizer” # transform the sentence into a vector representation
- name: “SklearnIntentClassifier” # uses the vector representation to classify using SVM
- name: “EntitySynonymMapper” # trains the synonyms
policies:
- name: “KerasPolicy” featurizer:
- name: MaxHistoryTrackerFeaturizer max_history: 5 state_featurizer:
- name: BinarySingleStateFeaturizer
- name: “MemoizationPolicy” max_history: 5
- name: “FallbackPolicy” nlu_threshold: 0.4 core_threshold: 0.3 fallback_action_name: “my_fallback_action”
And the domain:
intents:
- greet
- goodbye
- mood_affirm
- mood_deny
- mood_great
- mood_unhappy
- inform
slots: group: type: text
entities:
- group
actions:
- utter_greet
- utter_did_that_help
- utter_happy
- utter_goodbye
- my_fallback_action
- utter_ask_picture
- action_retrieve_image
- default
templates: utter_greet:
- text: “Hey! How are you?”
utter_did_that_help:
- text: “Did that help you?”
my_fallback_action:
- text: “I am not sure what you are aiming for.”
utter_happy:
- text: “Great carry on!”
utter_goodbye:
- text: “Bye”
utter_ask_picture:
- text: “To cheer you up, I can show you a cute picture of a dog, cat or a bird. Which one do you choose?”
default:
- text: “Default test”
and sample stories:
strange user
- mood_affirm
- utter_happy
- mood_affirm
- default
- my_fallback_action
say goodbye
- goodbye
- utter_goodbye
fallback
- default
- my_fallback_action
The error i’m getting is:
rasa.core.processor - Encountered an exception while running action ‘my_fallback_action’. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code.
The ‘default’ action is also not being executed, so I suspect it’s got something to do with the policy itself.
I couldn’t find anything related on the forum, and I believe i’ve followed the instructions in the 1.0.6 documentation properly.
…and apologies if the body of this post isn’t formatted properly
Thank you!