Multiple bots

Hello everyone, I am trying to make my bot work for multiple procedures. When the bot starts, I assign the name of the procedure to a slot and an entity with the purpose of helping me to predict the intention of the correct procedure. Ask how to do it in the following post and I had no answer so I assume that it can not.

The only thing that occurs to me not to endorse the project with the rasa platform is to have multiple bots, is this possible? What would be the best way to do it so that its maintenance is not complicated?

And how could I direct which bot to use according to the procedure?

Thank you

Hi @fmelossi!

Could you please explain what exactly do you mean by “procedures”?

Also, I tried skimming through the posts that you have linked. What I understand from it is that, you want to concatenate a string with the incoming text messages before sending it to rasa for processing. Is this understanding correct?

Hello @saurabh-m523, thanks for answering

sorry for the wrong translation, I mean formalities

Your interpretation is correct of what I want to do. It is what occurs to me since different formalities have the same or similar intentions, this makes the prediction incorrect.

greetings and thanks

If you know the ‘what’ and ‘when’ to concatenate beforehand, then you can easily do that at the connector before sending it to rasa for processing. What channel are you using?

Hi, The channel that I am using is webchat, I know what I send because I complete a slot when I start the chat, when the user writes his question in some way he should concatenate that text so that the prediction works well

Hi @fmelossi!

Webchat uses socketio channel. This is the code of the connector. You can modify this line (data["message"]) to concatenate whatever you want before sending it to rasa (await on_new_message(message)) in a custom connector.

You can customize a channel like this

Hope that helps.

1 Like

Thanks for answering @saurabh-m523

I will try to do what you suggest, I am not very expert yet.

I know that this solution is not very elegant because for each user message the name of the procedure will be concatenated.

I would have liked that the prediction of the intention had taken into account the value of the slot and / or the entity, but unfortunately it does not and I had to find this solution that is not elegant


Hi @fmelossi!

You mean like not visible to the sender? If you concatenate the user message at the connector, it’ll not be visible to the sender.

The intent is predicted based on the trained model and the model is trained based on the NLU data. So if your data has those strings that you want to concatenate, then it’ll certainly help during prediction.

Hello @saurabh-m523

As I am still new to rasa, could you help me by indicating what file that line is in, so I can modify it

Thank you

Hi @fmelossi!

The file is your socketio channel. It should be located here: <your_virtual_environment_path>/rasa/core/channels/

Also, you should not modify this file directly. Instead you should copy all the contents of this file in a separate file (for example say Now do your modifications in this file and save it in the same directory in which your credentials.yml file is.

Now you can specify your file in credentials.yml so that rasa would use this file instead of the original one. You can specify it by putting something like this in your credentials.yml:

 user_message_evt: user_uttered
 bot_message_evt: bot_uttered
 session_persistence: true

Hope that helps :slightly_smiling_face:

@saurabh-m523 Thank you very much for your answer

I followed the steps you indicated, I can’t get it to work concatenate the text Prueba as an example but it doesn’t work, I copy the images of the files that I have modified



Could you please try running the server in debug mode and post the logs here so that we can be sure that it is not working.

@saurabh-m523 attached image

Hmm :thinking:

Well @fmelossi, I couldn’t think of a reason why this is not working, it should have at least concatenated the original message with “Prueba”.

I need to dig deeper to know what’s happening.

Could you please try commenting out all the other channels except the custom channel from credentials.yml and then run the bot in debug mode without API enabled? We are doing this to ensure that we can communicate with the bot via the custom channel only. Also please upload the custom channel file here (if possible).

You can also message me if required. I’m really curious to know why this is not working.

I @saurabh-m523 I am sharing the personalized channel with you. Hope we can find the problem

Thank you (7.2 KB)

Hi @saurabh-m523

It’s working correctly. I see it running in debug mode

but since it didn’t show it to me in the graphic interface of webchat I thought that it didn’t work

What I have to concatenate is the value of a slot How can I get that value?


Hi @fmelossi!

Sorry for the late reply :sweat_smile:.

I couldn’t get a chance to debug your custom channel but since it is working correctly so let’s skip that :slightly_smiling_face:.

It is not showing in webchat because we are concatenating it after the user has sent a message through the webchat. Isn’t that what you initially wanted?

Now, we need a tracker object in our custom connector so that we could extract the value of a slot. The simplest way (that I could think) of doing that is to make a call to the HTTP API of rasa and parse the JSON object for that particular slot. I haven’t tested it myself though.

Run your server with APIs enabled. You can then send a GET request to this API from inside your custom connector and parse the response to extract the value of the required slot. You can now use this value to concatenate with your messages.

Try it out and let me know if it works :grin:.

@saurabh-m523, Thanks for your answer, so far everything is going as I wanted

Sorry but I’m new to this, could you help me to know how to do it.

On the other hand, to make the path easier, can the value of customData be captured ???

Help me understand one thing, if we could capture the value of customData, then would you still require the value of the slot? or do you just want to capture the value of the customData so that you could concatenate it with the original message?