首页 > 解决方案 > 通过网络聊天连接到 rasa 聊天机器人时出现错误 404

问题描述

我已经在 Heroku 上部署了我的 rasa 聊天机器人。其余频道工作正常(与邮递员核实)。但是当我尝试使用网络聊天连接它时,它会抛出 404 错误。这是我正在使用的脚本:

    <script>!(function () {
  let e = document.createElement("script"),
    t = document.head || document.getElementsByTagName("head")[0];
  (e.src =
    "https://cdn.jsdelivr.net/npm/rasa-webchat/lib/index.js"),
    (e.async = !0),
    (e.onload = () => {
      window.WebChat.default(
        {
          customData: { "session_id": "abc" },
          socketUrl: "link to heroku server",
          title: "ChatBot",
          params:{
            images:{
              dims:{
                width: 250,
                height: 100
              }
            },
            storage: "session"
          }
          // add other props here
        },
        null
      );
    }),
    t.insertBefore(e, t.firstChild);
})();
</script>

这是错误:

2021-04-15T01:16:36.611516+00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=NZJ6V31" host=helpdesk-chatbot.herokuapp.com request_id=083c28e8-5309-4ab6-9d54-954c66a3d066 fwd="114.31.152.35" dyno=web.1 connect=1ms service=13ms status=404 bytes=908 protocol=http

我应该怎么办?

标签: socket.iorasa

解决方案


推荐阅读