Hello everybody,
I am trying to connect this webchat widget to rasa (GitHub - botfront/rasa-webchat: A feature-rich chat widget for Rasa and Botfront), but I am getting this error in my console:
and this error on my connector console:
( By the way, two days ago I did not have this error in my connector, I was using this Package in Angular (angular-chat-widget-rasa - npm), but now I can’t even connect to this one also.)
I pasted this code on my website inside the < body > tag.
<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>
and here is the code of my connector:
from rasa.core.agent import Agent
from rasa.core.interpreter import RasaNLUInterpreter
from rasa.core.channels.socketio import SocketIOInput
from rasa.utils.endpoints import EndpointConfig
agent = Agent.load("./models/20190807-131628",
action_endpoint=EndpointConfig(url="http://localhost:5055/webhook"))
input_channel = SocketIOInput(
# event name for messages sent from the user
user_message_evt="user_uttered",
# event name for messages sent from the bot
bot_message_evt="bot_uttered",
# socket.io namespace to use for the messages
namespace=None
)
s = agent.handle_channels([input_channel], 5002)
Operating system macOS Mojave version 10.14.5 Rasa Version 1.0.9
Please help me solve this problem, Thanks