Hello. I am total beginner and a lay person when it comes to Rasa and web-dev. I have a functioning assistant and I am now interested in integrating it with a SharePoint page on my company’s intranet.
After reading the Rasa docs I decided to setup a Websocket Channel.
I added the following to my credentials.yml page:
socketio:
user_message_evt: user_uttered
bot_message_evt: bot_uttered
session_persistence: true/false
I picked up the chatroom component from here to embed onto my SharePoint page:
Following the github instructions I pasted the chatroom.js script into my SharePoint page’s custom script.
However I am lost when it comes to the next set of instructions on the github page:
<< 2. In your Rasa bot setup, make sure to include the Rasa REST channel in your credentials.yml file:
rest:
# pass
Depending on your setup you might need to start the Rasa CLI / Rasa server with the right CORS headers, e.g. --cors "*" .>>
Could someone kindly breakdown for me what it is I need to do here?..and if there are any additional steps I need to take?
I’ve attached my credentials.yml and sharepoint script here as well.
credentials.yml (753 Bytes)
webchat.html (707 Bytes)
Looks good to me If you are accessing the chat from another machine you might indeed need to add the cors settings. So that would mean to do rasa run --cors "*".
Are you getting any errors or were you just asking in general?
Thanks for the reply Tobias. Ah I get it now, you run that as a terminal command. I was just asking in general what to do for step number 2 there. Ok I did that and it looks like I’m getting a mixed result.
If I run that script by itself in the browser…it seems to work:
Talked to a colleague of mine, he thinks this is a CORS (Cross Origin Resource Sharing) issue because my Rasa is running on a VM machine and our SharePoint sites are hosted on a different domain. He is certain this would go away if we ran Rasa on the same domain as our SharePoint sites and I think that is the end-goal for us especially when we are getting ready to take this to production…but for now I need it to work under this setup so I can demo this to our business users. Has anyone encountered something like this before?
@seansta Can you run rasa with --debug (e.g. rasa run --debug) to see if there are any errors / warnings from the REST input channel? And --cors did not work for you?
I copied my Rasa project to the machine that is hosting our SharePoint quality farm. Ran rasa and fired up the SharePoint page with the chat widget. Everything works when I run “rasa run --cors”.
Now the question is how do I make this accessible for other users in our network? The chat does not work when I try to access the page from any other machine.
The chat does not work when I try to access the page from any other machine.
I guess the client is javascript and you are targeting localhost, aren’t you? The chatbot has to be accessible via a public IP if you want to access it from an other machine. If you just want to test it out quickly, you can use https://ngrok.com/ for that.
Ah got it, makes total sense Tobias. Now the latest roadblock is that I can’t seem to access ngrok, company firewall blocks it. Do you know of any other methods of making my bot running on localhost public?
Do you know of any other methods of making my bot running on localhost public?
Mhm, I guess the firewall will block them all (And a good company firewall should ) Can you maybe speak to somebody in your company who is responsible for deploying things according to your company policies?
Had a meeting of the minds with our IT middleware team and we tried a few things and we still could not get it to work.
By default Rasa runs on localhost 5005.
How can we switch it to a different server? We were thinking of pointing it to directly to our SharePoint quality server: https://westapps.ev.com, using port 440…which is the port SharePoint uses.
I tried running a terminal command with these arguments, but was getting errors:
Tobias I mean, Rasa by default runs on localhost 5005…how can I change this to something else? I want to change it to a port on one of our company’s servers.
I cannot somehow configure rasa to run at that IP and port through console commands? If that is the case, do I need to setup this public IP to be a reverse proxy for rasa running in localhost?
Ah I got what you are saying Tobias. Due to load balancing I think the best option is to use a reverse proxy to expose Rasa. Will try that. Thank you for all of your help!