ConsoleInputChannel no longer exist - Rasa Open Source - Rasa Community Forum

👋 Introducing the Rasa Playground

ConsoleInputChannel no longer exist

post by adrianhumphrey111 on Aug 29, 2018

I can not find how to use my bot through the console anymore. The ConsoleInputChannel Class is no longer in rasa_core.channels.console. What is going on here?

Me too

post by Krogsager on Aug 30, 2018

What version are you using?
Migration Guide

post by adrianhumphrey111 on Aug 30, 2018

I am using the latest rasa core. Why are you pointing me to the migration guide if you have not read it? It addresses nothing about the consoleInputChannel.

post by adrianhumphrey111 on Aug 30, 2018

Also, it is broken on the rasa core documentation guide, so it has not been addressed.

post by jloutz on Aug 31, 2018

Hi there. Same issue. Migration Guide is no help. I will investigate and post a solution if I find one.

post by akelad on Aug 31, 2018

It has changed, look at the run script to see how to run in the command line now: Link

post by adrianhumphrey111 on Aug 31, 2018

Akelad, you are amazing. Could you look at this topic as well for me?
Routing between agents

post by jloutz on Aug 31, 2018

So I know you have all already figured this out, but i will share this anyway. I have a python script which wraps common tasks like training running etc. Migrating from core 9 to core 11 caused me a small amount of work to get that going again.

My custom “run” method for command line (in my script) in V9 looked like this:

def run(dbug=False):
    if dbug:
        init_debug_logging()
    from rasa_core.run import create_input_channel
    agent = main("models/dialog",nlu_model="models/nlu/current",channel="cmdline")

agent = Agent.load("models/dialog", "models/nlu/current")
    input_channel = create_input_channel("cmdline", None, None)
    agent.handle_channel(input_channel)

return agent

Now (V11) it looks like this:

def run(dbug=False):
    if dbug:
        init_debug_logging()
    interpreter = NaturalLanguageInterpreter.create("models/nlu/current")
    from rasa_core.utils import EndpointConfig
    action_endpoint = EndpointConfig(url="http://localhost:5056/webhook")
    agent = Agent.load("models/dialog", interpreter=interpreter,action_endpoint=action_endpoint)
    rasa_core.run.serve_application(agent,channel='cmdline')

post by adrianhumphrey111 on Aug 31, 2018

Thank you very much for this.

post by pnandhini on Sep 10, 2018

Hi @jloutz, I am new to Rasa chatbot and have so many questions in my mind for which I am figuring the answers. Can you help me figure out a main question in version 11.

post by jloutz on Sep 12, 2018

Hi there - not really something I have special knowledge about other than the rasa docs. I am sure the rasa team will be able to help. Good luck!

post by r4sn4 on Sep 13, 2018

In this line of code -

    rasa_core.run.serve_application(agent,channel='cmdline')

I am getting this error - module ‘rasa_core’ has no attribute ‘run’

post by akelad on Sep 14, 2018

@pnandhini you can use the rest input channel: Rest Channels

post by Hakim on Apr 8, 2020

it seems like now ConsoleInputChannel() no longer exists. How do I configure my bot to run on cmd now?


This is my file for online_train.py. Here ConsoleInputChannel is not working. Can you tell me on what changes should i make to the given code to make it work?