Is there any way to use trained rasa model outside rasa shell

Hey @sashaank.

Seems like you’re trying to run the bot from inside the script. Rasa provides “Agents” that you can use to achieve this.

You can use methods like handle_text in case of CollectingOutputChannel. For example:

>>> from rasa.core.agent import Agent
>>> from rasa.core.interpreter import RasaNLUInterpreter
>>> agent = Agent.load("examples/restaurantbot/models/current")
>>> await agent.handle_text("hello")
[u'how can I help you?']

More information is available at the Agent docs

1 Like