I am trying to use MappingPolicy to deactivate an active form in Rasa version 1.1.8. In the conversation with my chatbot, a user gets buttons with a payload for it.
In the payload of one button, I have /deactivate_intent
. In the domain.yml
, I have mapped this intent as follows:
- deactivate_intent: {triggers: action_deactivate_form}
I also have put MappingPolicy
in my config.yml
as follows:
policies:
- name: MemoizationPolicy
max_history: 3
- name: KerasPolicy
featurizer:
- name: MaxHistoryTrackerFeaturizer
max_history: 3
state_featurizer:
- name: BinarySingleStateFeaturizer
- name: MappingPolicy
- name: FormPolicy
- name: TwoStageFallbackPolicy
nlu_threshold: 0.65
core_threshold: 0.35
fallback_nlu_action_name: "action_default_fallback"
fallback_core_action_name: "action_default_ask_affirmation"
deny_suggestion_intent_name: "out_of_scope"
Still, Rasa isn’t triggering the mapped action. Instead the active form def_form
is getting triggered.
Below is the log:
2019-11-05 12:29:41 DEBUG rasa.core.processor - Received user message '/deactivate_intent' with intent '{'name': 'deactivate_intent', '
confidence': 1.0}' and entities '[]'
2019-11-05 12:29:41 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 25 events
2019-11-05 12:29:41 DEBUG rasa.core.policies.memoization - Current tracker state [{'prev_action_abc': 1.0, 'intent_ask_def': 1.0
}, {'prev_action_def': 1.0, 'intent_ask_def': 1.0}, {'intent_ask_def': 1.0, 'prev_action_listen': 1.0}]
2019-11-05 12:29:41 DEBUG rasa.core.policies.memoization - There is no memorised next action
2019-11-05 12:29:41 DEBUG rasa.core.policies.mapping_policy - There is no mapped action for the predicted intent, 'deactivate_intent'.
2019-11-05 12:29:41 DEBUG rasa.core.policies.form_policy - There is an active form 'def_form'
2019-11-05 12:29:41 DEBUG rasa.core.policies.two_stage_fallback - NLU confidence threshold met, confidence of fallback action set to core threshold (0.35).
2019-11-05 12:29:41 DEBUG rasa.core.policies.ensemble - Predicted next action using policy_1_KerasPolicy
2019-11-05 12:29:41 DEBUG rasa.core.processor - Predicted next action 'def_form' with confidence 0.90.
2019-11-05 12:29:41 DEBUG rasa.core.actions.action - Calling action endpoint to run action 'def_form'.
This only happens when I run the model in server. In the shell, it is working fine.