Rasa webchat for mulitiple chatbots

Hi,

I am finding a way to deploy two chatbots (e.g. http://firstbot.com / http://secondbot.com) by rasa_webchat (https://github.com/botfront/rasa-webchat). Seemingly, I can deploy one of my chatbots by filling out socketUrl as depicted below:

<script>!(function () {
  let e = document.createElement("script"),
    t = document.head || document.getElementsByTagName("head")[0];
  (e.src =
    "https://cdn.jsdelivr.net/npm/rasa-webchat@1.x.x/lib/index.js"),
    // Replace 1.x.x with the version that you want
    (e.async = !0),
    (e.onload = () => {
      window.WebChat.default(
        {
          customData: { language: "en" },
          socketUrl: "https://bf-botfront.development.agents.botfront.cloud",
          // add other props here
        },
        null
      );
    }),
    t.insertBefore(e, t.firstChild);
})();
</script>

Is there any way to deploy two chatbots using rasa_webchat? Seems it won’t work if I add another socketUrl . Any help would be greatly appreciated. Thanks!

@miner Hello, I guess you want to deploy your two bot using single code? Right. Ok But, that can’t be possible I guess. If you have two chatbots means you have two different project for sure, if they are not running on two different server, then you can use two different project code in either bots (importing chatbots); But, I am afraid you can not render two chatbot widgets using two chatbots while using one snippet code.

  1. A chatbot → Code → Webchat snippet → Server → Website
  2. B chatbot → Code → Webchat snippet → Server → Website

Not possible (I not used) : A chatbot, B chatbot → A+B Code → Webchat snippet → Server (not idle scenario ) → Website

Single project, single rasa Webchat!

Please do discuss if you have any further issue or thoughts

Well noted. I think so too. Thanks for your answer!!

@miner No worries! Please close this thread Rasa webchat for mulitiple chatbots - #2 by nik202 for your reference and for others. :slight_smile: