Closed shashwatrathod closed 3 years ago
Hello, I have noted the changes to be done and I will start working on them. I will also create the README_RASA.md which might act as a beginner's guide to the framework.
Thanks!
Hello! I have made the changes you requested for! I have added a very brief guide showing how to get started with Rasa and use chat-bubble to communicate with Rasa servers. I also prettier-fied example/7-Rasa_demo.html .
Hi @shashwatrathod, thank you for the changes!
I've tried to run the example on my machine but there are XHR errors both when I run the file from the filesystem and when I try to serve it with [serve](https://www.npmjs.com/package/serve)
. Do you know what may be the issue?
Hello, I created a basic RASA project and tried serving ChatBubble using serve. It works fine for me. However, by the error you're getting, it seems like one of the two following steps could solve this issue:
Make sure that you pass the "--enable-api" and "--cors " argument while serving RASA. The command should look like this: `rasa run --enable-api --cors -p 1001`. Find the reference for 'rasa run' here.
Navigate to path/to/rasa/project/credentials.yml and add the following lines in the file to enable REST input:
rest:
Find the reference in RASA docs here
I hope this solves your issue!
Regards
Nope, no luck. I tried adding a "callback" as per docs, used the credentials example and ran from the terminal with --enable-api --cors * -p 1001
. Did you have to disable same-origin policy within your browser or have any other settings in your app which may have helped with CORS?
Hey @shashwatrathod, I merged your code in #85 with some minor tweaks. Turns out there were quotes missing from --cors '*'
flag, adding the '
fixed everything. I'm usually much quicker with these things but the past few months have been insane for me both personally and at work.
Thank you again for your work, I really appreciate your contribution!
Hey! @dmitrizzle, thank you very much! I was also caught up in a couple of things this past month, so it was really generous of you to find that bug for me. chat-bubble is a nice project and it was fun to make this little contribution!
Thanks!
Bubbles.js
Added a callback function called bubbleCallbackFn which is called whenever a user clicks on a 'bubble-pick' element. This is useful for scenarios where the action to be taken is not necessarily known or defined in the 'convo', like NLC tasks.
7-Rasa_demo.html
It demonstrates the integration of a famous NLC framework - RASA with chat-bubble. It also provides a usecase for bubbleCallbackFn. To use this, a RASA server has to set up. The port and URL have to be edited in the html file. After the ice, the user can enter any text and the output will be delivered through RASA.
I think chat-bubble is a very powerful and easy tool to use. These changes will help demonstrate the versatility of the project. Thanks !