Breaking changes in the new release-no ConsoleInputChannel?

It seems like the latest release of Rasa Core has some breaking changes. First it seems like the Agent api has changed:

raise Exception("Passing `featurizer` and `max_history` " Exception: Passing `featurizer` and `max_history` to `agent.train(...)` is not supported anymore. Pass appropriate featurizer directly to the policy instead.

Also there is no ConsoleInputChannel anymore? I was trying to run the small talk example ( I found on one of the rasa-github issues I get the following error.

Traceback (most recent call last):
  File "", line 9, in <module>
    from rasa_core.channels.console import ConsoleInputChannel
ImportError: cannot import name 'ConsoleInputChannel'

When I do dig into the ConsoleInputChannel class seems to have been removed. The cmdline option in seems to be the default which seems to call a RestInputChannel. I don’t see any documentation regarding this, and/or migrating from ConsoleInputChannel to RestInputChannel.

Best, Aanchan

Did you read migration guide:

1 Like

The ConsoleOutputChannel migration guide is missing from the current docs, but we just pushed out 0.11.2, which means the docs will be updated in a few minutes

Could you maybe explain how to use it in a python script?

Either use the run script to run your bot on the cmdline, or adapt the serve_application function to run from a python script.

I’m not sure how to adapt my code at the moment.

def run(serve_forever=True):
interpreter = RasaNLUInterpreter("./models/nlu/default/Assistantv1")
agent = Agent.load("./models/dialogue", interpreter=interpreter)

if serve_forever:
return agent

Someone’s posted a solution here

1 Like

Thank you!!!

1 Like

@Sam Thanks for that. It was a bit irritating that ConsoleInputChannel was missing, and wasn’t mentioned in the migration guide. I’ll try the link you posted. Appreciate it.

It’s in the migration guide:

Thanks Sam, this works perfectly…

Hi @andre ,

can you please post the complete modified code , as i am very new to python, I have successfully created the nlu model but facing issue with core,

Rasa_nlu = 0.15.1 Rasa_core = 0.14.1

Thank you