how can i chat with bot on command line?

when i run the def run(), i found the agent.handle_channel is deprecated, and i can’t find the new function to solve it, i don’t want to use ‘rasa shell’, so what can i do?

def run(serve_forever=True): agent = Agent.load(“models/dialogue”, interpreter=RasaNLUInterpreter(“models/demo”)) if serve_forever: agent.handle_channel(ConsoleInputChannel()) return agent

source code:

Training the NLU model

Since the release of Rasa 1.0, the training of the NLU models became a lot easier with the new CLI. Train the model by running:

rasa train nlu

Once the model is trained, test the model:

rasa shell nlu