socket.io - 通过网络聊天连接到 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
我应该怎么办?
解决方案
推荐阅读
- javascript - 如何根据数组的值替换字符串的元素?
- reactjs - Heroku 未拾取 Laravel Mix 变量
- firebase - 在内部使用 Anmiation 时,FutureBuilder 未完成
- eclipse-atl - “at”函数不适用于有序集
- javascript - javascript - 将坐标数组拆分为单独的数组
- html - 从 worldometers.info 向我的 Html 网站添加活人口
- html - material-ui 菜单宽度和 cdk-overlay-pane 自定义
- python - tkinter 布局和 ttk.Notebook 的问题
- python - Django extra-views:有什么方法可以控制它们的显示方式吗?
- java - 如何打印用 Java 排序的数组的所有非空子集?