将Rasa chatbot连接到Webch

2024-09-26 18:01:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图将这个webchat小部件连接到rasa(https://github.com/mrbot-ai/rasa-webchat),但我在控制台中得到了这个error,在我运行连接器脚本的终端上也得到了这个error。在

但是两天前我的连接器没有这个错误,我也在使用Angular angular-chat-widget-rasa中的这个包,但是现在连这个包都不能和Rasa连接。在

对于Webchat接口,我将此代码粘贴到我的网站的body标签中。在

<body> <div id="webchat"> <script src="https://storage.googleapis.com/mrbot-cdn/webchat-latest.js"></script> <script> WebChat.default.init({ selector: "#webchat", initPayload: "/get_started", interval: 1000, // 1000 ms between each message customData: { "sender": "django" }, // arbitrary custom data. Stay minimal as this will be added to the socket socketUrl: "https://localhost:5002", title: "Connect", subtitle: "The bot which connects people", profileAvatar: "https://rasa.com/assets/img/demo/rasa_avatar.png", showCloseButton: true, fullScreenMode: false, hideWhenNotConnected: false, }) </script> </div> </body>

这是我的连接器的代码:

^{pr2}$

我使用的是MacOSMojave 10.14.5版操作系统和Rasa 1.0.9版

请帮我解决这个问题,谢谢


Tags: 代码httpsdivgithubcomfalse部件script

热门问题