Transferring Custom Data to Rasa (custom channel)

Dear Community,

I’m using Rasa to include a simple bot into a website that has authenticated users (using Webchat, GitHub - mrbot-ai/rasa-webchat: A chat widget easy to connect to chatbot platforms such as Rasa Core and the socketio channel). Now I want to transmit some custom data like the userId of the authenticated user to Rasa, best case within every message uttered by the user. I need this userId in my custom actions.

My current understanding is that the only possibility would be to create an own Custom Channel based on the socketio channel and retrieve customData there from the socketio JS client. But currently I’m struggling with two issues here:

  1. Is there a possibility to implement a custom channel without patching the Rasa Core itself? Background: I don’t want to patch every version of Rasa Core manually, when it comes to new releases. I’m looking for a separate module that is only referencing Rasa Core and that I can somehow link to the Rasa Core runtime (disclaimer: I’m a python noob).

  2. Other users said there should be a possibility to set slots from within the SocketIOInput, but I don’t know how to do that from within socketio.py. Background: When I retrieve customData within the handle_message method, I want those data set to a slot for later usage within my conversations. So what do I have to do call in order to set slots on the conversation?

Thanks a lot for your help, Mirko

1 Like

Hi, did you found any solution for this?

hey Mirko, how did you retrieved customData within handle_message method ,please share the code