# how can i chat with bot on command line?

**URL:** <https://forum.rasa.com/t/how-can-i-chat-with-bot-on-command-line/14369>\
**Category:** Rasa Open Source\
**Created:** [August 15, 2019, 7:57am UTC](https://forum.rasa.com/t/how-can-i-chat-with-bot-on-command-line/14369 "2019-08-15T07:57:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![lmobot](https://avatars.discourse-cdn.com/v4/letter/l/e8c25b/32.png) [@lmobot](https://forum.rasa.com/u/lmobot)\
**Post date:** [August 15, 2019, 7:57am UTC](https://forum.rasa.com/t/how-can-i-chat-with-bot-on-command-line/14369/1 "2019-08-15T07:57:56Z")

</div>

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:

> <https://github.com/Ma-Dan/rasa_bot/blob/master/bot.py>

---

<div class="post-metadata">

**Author:** ![SallemiDorsaf](https://avatars.discourse-cdn.com/v4/letter/s/b782af/32.png) [@SallemiDorsaf](https://forum.rasa.com/u/SallemiDorsaf)\
**Post date:** [August 15, 2019, 10:39am UTC](https://forum.rasa.com/t/how-can-i-chat-with-bot-on-command-line/14369/2 "2019-08-15T10:39:24Z")

</div>

### 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`

> **[Weatherbot\_Tutorial/Full\_Code\_Latest at master · JustinaPetr/Weatherbot\_Tutorial](https://github.com/JustinaPetr/Weatherbot_Tutorial/tree/master/Full_Code_Latest)**
>
> Contribute to JustinaPetr/Weatherbot\_Tutorial development by creating an account on GitHub.
