diff --git a/examples/rules/config.yml b/examples/rules/config.yml index b30f3b4f6615..be06b1a15a7b 100644 --- a/examples/rules/config.yml +++ b/examples/rules/config.yml @@ -14,7 +14,6 @@ pipeline: - name: EntitySynonymMapper - name: FallbackClassifier threshold: 0.5 - fallback_intent_name: nlu_fallback policies: - name: RulePolicy diff --git a/rasa/nlu/classifiers/fallback_classifier.py b/rasa/nlu/classifiers/fallback_classifier.py index 80dd685f064a..c995befeed54 100644 --- a/rasa/nlu/classifiers/fallback_classifier.py +++ b/rasa/nlu/classifiers/fallback_classifier.py @@ -8,7 +8,6 @@ from rasa.nlu.constants import INTENT_RANKING_KEY, INTENT, INTENT_CONFIDENCE_KEY THRESHOLD_KEY = "threshold" -FALLBACK_INTENT_NAME_KEY = "fallback_intent_name" class FallbackClassifier(Component): @@ -18,10 +17,7 @@ class FallbackClassifier(Component): # ## Architecture of the used neural network # If all intent confidence scores are beyond this threshold, set the current # intent to `FALLBACK_INTENT_NAME` - THRESHOLD_KEY: DEFAULT_NLU_FALLBACK_THRESHOLD, - # The intent which is used to signal that the NLU confidence was below the - # threshold. - FALLBACK_INTENT_NAME_KEY: DEFAULT_NLU_FALLBACK_INTENT_NAME, + THRESHOLD_KEY: DEFAULT_NLU_FALLBACK_THRESHOLD } @classmethod @@ -59,7 +55,7 @@ def _should_fallback(self, message: Message) -> bool: def _fallback_intent(self) -> Dict[Text, Union[Text, float]]: return { - "name": self.component_config[FALLBACK_INTENT_NAME_KEY], + "name": DEFAULT_NLU_FALLBACK_INTENT_NAME, # TODO: Re-consider how we represent the confidence here INTENT_CONFIDENCE_KEY: 1.0, }