I am trying to use RASA official chat widget with server running in localhost. These are the steps I performed.
- Start action server
rasa run actions
- Start rasa server
rasa run -m models --enable-api --log-file out.log --cors "*"
- Create index.html as below.
<html>
<body>
<div id="rasa-chat-widget" data-websocket-url="http://localhost:5005"></div>
<script src="https://unpkg.com/@rasahq/rasa-chat" type="application/javascript"></script>
</body>
</html>
My credentials.yml looks like this
# This file contains the credentials for the voice & chat platforms
# which your bot is using.
# https://rasa.com/docs/rasa/messaging-and-voice-channels
rest:
# # you don't need to provide anything here - this channel doesn't
# # require any credentials
#facebook:
# verify: "<verify>"
# secret: "<your secret>"
# page-access-token: "<your page access token>"
#slack:
# slack_token: "<your slack token>"
# slack_channel: "<the slack channel>"
# slack_signing_secret: "<your slack signing secret>"
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true
#mattermost:
# url: "https://<mattermost instance>/api/v4"
# token: "<bot token>"
# webhook_url: "<callback URL>"
# This entry is needed if you are using Rasa X. The entry represents credentials
# for the Rasa X "channel", i.e. Talk to your bot and Share with guest testers.
rasa:
url: "http://localhost:5002/api"
However when I visit the index.html page, I got error below and there is no response from the bot.
2021-12-10 12:56:33 INFO root - Rasa server is up and running.
The WebSocket transport is not available, you must install a WebSocket server that is compatible with your async mode to enable it. See the documentation for details. (further occurrences of this error will be logged with level INFO)
[2021-12-10 12:57:34 +0800] [4072] [ERROR] Exception occurred while handling uri: 'http://localhost:5005/socket.io/?EIO=4&transport=polling&t=NsYj26-'
Traceback (most recent call last):
File "handle_request", line 83, in handle_request
class Sanic(BaseSanic, metaclass=TouchUpMeta):
File "C:\Users\user\miniconda3\envs\chatbot\lib\site-packages\engineio\asyncio_server.py", line 317, in handle_request
return await self._make_response(r, environ)
File "C:\Users\user\miniconda3\envs\chatbot\lib\site-packages\engineio\asyncio_server.py", line 385, in _make_response
response = make_response(
File "C:\Users\user\miniconda3\envs\chatbot\lib\site-packages\engineio\async_drivers\sanic.py", line 102, in make_response
return HTTPResponse(body=payload, content_type=content_type,
TypeError: 'NoneType' object is not callable
My RASA version is
Rasa Version : 3.0.2
Minimum Compatible Version: 3.0.0
Rasa SDK Version : 3.0.2
Rasa X Version : None
Python Version : 3.8.0
Operating System : Windows-10-10.0.19041-SP0
Appreciate if anyone can point out which part I did wrongly.
Thanks