Using rasa as a python library to interact with the bot

Hello, been a long time but is it still possible to run Rasa as a python library to make inferences on the models using pure python?? instead of running rasa run?

or this is deprecated

Hi @souvikg10. Great to see you here! Overall, the previous way of running the agent as a python module has been deprecated and replaced with the cli. However, you can still access the methods that can be used to train or run the models. For example, a very basic way of training the model would look as follows:

import rasa

config = "config.yml"
training_files = "data/"
domain = "domain.yml"
output = "models/"

model_path = rasa.train(domain, config, training_files, output)
1 Like

amazing. looks a lot simpler than before when i used to load agents :stuck_out_tongue:

I will try to be more active from now on, given i will now work on Rasa as well :smiley:

Thanks.

2 Likes