I’ve been using Rasa for awhile. Currently, I’m only using the NLU part of Rasa and created custom chatbot based on the NLU result in python by accessing
rasa.nlu.model.Interpreter. It works fine for simple single question-answering system. I’m using this system to connect with another app that requires these outputs from the system:
text: response intent: intent_name entities: [extracted_entities] api_output: [api_object1, api_object2] is_oot: boolean
Now, I want the chatbot to have more complex dialog flow and planning to use Rasa Core instead of only Rasa NLU. I have designed the custom actions, domain, config, and stories. However, as mentioned above, I need other things as output for the other app. I tried searching in the documentation and the forum on how to solve the problem:
Assuming I run the Rasa Core using the shell command
rasa run, the output format from this REST Channels section is good enough, but I want to add more to the output json and I can’t find on how to connect the REST Channels in python since I don’t have experience outside of python.
I prefer to run the server and obtain the output values in python. The best bet that I can do is by accessing the
>>> 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?']
handle_text function seems like to only output the text response. Is there any way to extract all the required values above using this way?