botfront / rasa-addons

A set of 🚀🚀🚀 components to be used with Botfront and/or Rasa
https://botfront.io
Apache License 2.0
131 stars 37 forks source link

intent_substitutions are not working in core 0.11.3 #19

Closed leonardoaii71 closed 6 years ago

leonardoaii71 commented 6 years ago

Hello,

I'm trying to use intent_substitutions in rasa core 0.11.3 but the intent is not substituted. I am not sure if I'm loading the SuperAgent or using the rules.yml correctly.

I'm trying to load the SuperAgent and using the command line as channel. I used the methods from run.py script. This is the code:

AvailableEndpoints = namedtuple('AvailableEndpoints', 'nlg '
                                                          'nlu '
                                                          'action '
                                                          'model')
_endpoints = EndpointConfig(url="http://localhost:5055/webhook")
        endpoints = AvailableEndpoints(action=_endpoints, nlg=None, nlu=None, model=None)
        _interpreter = RasaNLUInterpreter("models/current/nlu/")

        _Sagent = SuperAgent.load("models/current/dialogue",
                                interpreter=_interpreter,
                                generator=endpoints.nlg,
                                tracker_store=None,
                                action_endpoint=endpoints.action,
                                rules_file='rules.yml')

        serve_application(_Sagent,
                          "cmdline",
                          constants.DEFAULT_SERVER_PORT,)

This is my rules.yaml `intent_substitutions:

I want that any input after utter_ask_password to be an inform intent but I'm getting the default_fallback. Also, what is the confidence of the new intent?

znat commented 6 years ago

Hi, there is clearly a possibility of a bug since the migration to 0.11+ is not released.

One comment though. The default_fallback is triggered when an action probability is too low. Can you try disabling the fallback and see if substitution still doesn't work?