Code to run the socketio channel def run(serve_forever=True):
interpreter = RasaNLUInterpreter('./models/nlu')
agent = Agent.load('./models', interpreter=interpreter)
if serve_forever:
input_channel = SocketIOInput(
user_message_evt="user_uttered",
bot_message_evt="bot_uttered",
namespace=None
)
s = agent.handle_channels([input_channel], 5002, "*")
return agent
Running this code will create turn up the rasa server with socket connection and I am able to have a conversation with the bot. (my bot design is not using any custom action and all the answer will be present in domain file).
I wanted to fulfill the below requirement.
- Receive the input from the user (Mr-Bot UI) and store it in the variable.
- Scrub the PII data from the input.
- Receive the intent from NLU with confidence level and store it in some variable.
- Receive the response from Domain.yml file and store it in some variable.
- Log the conversation in sqllite.
In custom Action, I have seen people are able to do that but how can I do that in run.py file.