-1

I have been trying to deploy my Rasa chatbot, but it is not responding when I write something to it on my website. I am programming the chatbot in Visual Studio Code, and it works perfectly there. I designed a script with a widget, which I have included in an index.html file, and I can interact with the widget. However, the chatbot never responds or it responds with 'undefined'. It could be a server issue, but I'm not sure since I don't have much knowledge in this area.

Has anyone successfully deployed a bot with a script on localhost? I am aware of Rasa webchat, but my Rasa version is not compatible with it, and I don't know what I'm doing wrong. :(

I have tried designing a script with a widget to write and send messages. I have tested it, and it works, but the bot doesn't respond or, when it does, it always responds with 'undefined'. I have added that script to my HTML page and tried to connect it to a localhost server. I started the server and verified that it was up and connected to Rasa, but it didn't respond to anything I typed. Does anyone have an example of a bot deployed locally?

James Z
  • 12,209
  • 10
  • 24
  • 44
Daviz
  • 1

1 Answers1

1

It is not clear to me which channel you are using to connect to the Rasa from your widget. But one of the problems that I faced in my initial days when using the REST channel, is that my script was failing to connect to Rasa due to CORS policy. To overcome that I had to allow CORS while running the Rasa.

rasa run --enable-api --cors "*"

For more information on channels and connectors please use the link below https://rasa.com/docs/rasa/connectors/your-own-website/

A Sarkar
  • 181
  • 1
  • 5