Apps.Rasa
Apps.Rasa copied to clipboard
Integration between Rocket.Chat and the RASA Chatbot platform
Apps.Rasa
Integration between Rocket.Chat and the RASA Chatbot platform
Some Important Concepts of App.Rasa
This app can operate in 2 modes:
-
Synchronous mode
In synchronous mode, the app will make use of Rasa's REST API to exchange message. The app will make use of Rasa's RESTInput channel.
If you are using this mode, make your you have enabled rest api in
credentials.ymlin your rasa bot. More info about it here -
Asynchronous / Callback Mode
In asynchronous mode, the app will make use of callbacks to receive messages from Rasa. The app will make use of Rasa's CallbackInput channel.
Note that if you are using
Reminders and External eventsin your Rasa Chatbot, then you will find this mode useful, as these features are only work in this mode.If you are using this mode, you will have to make following configuration to Rasa
-
You need to supply a
credentials.ymlwith the following content:callback: url: "http://localhost:3000/api/apps/public/646b8e7d-f1e1-419e-9478-10d0f5bc74d9/callback"You can find the correct url in the App Details page, under API section.
-
Installation steps:
Option 1
Download directly from Rocket.Chat marketplace
Option 2 (Manual Install)
-
Clone this repo and Change Directory:
git clone https://github.com/RocketChat/Apps.Rasa.git && cd Apps.Rasa/ -
Install the required packages from
package.json:npm install -
Deploy Rocket.Chat app:
rc-apps deploy --url http://localhost:3000 --username user_username --password user_passwordWhere:http://localhost:3000is your local server URL (if you are running in another port, change the 3000 to the appropriate port)user_usernameis the username of your admin user.user_passwordis the password of your admin user.
For more info refer this guide
Rocket.Chat Apps Setup
-
First go ahead n create a Bot User. Login as administrator, then goto
Setting > Users. There create a new Bot User. This new user should have these 2 roles.- bot
- livechat-agent
-
Then configure the app to automatically assign a livechat-visitor to this bot. To do so, goto
Setting > Livechat > RoutingorSetting > Omnichannel > Routing. There enableAssign new conversations to bot agentSetting. -
The app needs some configurations to work, so to setup the app Go to
Setting > Apps > Rasa. There, fill all the necessary fields inSETTINGSand click SAVE. Note all fields are required.Some of the fields in
SETTINGinclude- Bot Username (required)
- This should contain the same bot username which we created above in Step 1
- Rasa Server Url (required)
- URL for the Rasa Server goes here. Eg:-
http://localhost:5005
- URL for the Rasa Server goes here. Eg:-
- Service Unavailable Message (optional)
- The Bot will send this message to Visitor if service is unavailable like suppose if no agents are online.
- Close Chat Message (optional)
- This message will be sent automatically when a chat is closed
- Handover Message (optional)
- The Bot will send this message to Visitor upon handover
- Default Handover Department Name (required)
- Enter the target department name where you want to transfer the visitor upon handover. Note that you can override setting using Handover action.
- Enable Callbacks
- Enabling this setting will allow the app to use only callback messages. This feature is useful when you are using Reminder messages in your RASA bot.
- Hide Quick Replies (required)
- If enabled, then all quick-replies will hide when a visitor clicks on any one of them
- Bot Username (required)
Apps.Rasa's API
The app provides API to trigger specific actions. The URL for the API can be found on the Apps Page(Setting > Apps > Rasa). Currently the app provides 2 APIs.
-
Incoming API/Endpoint
This endpoint can be used to trigger specific actions. The list of supported actions include
- Close Chat
To close a chat- REST API Documentation for this endpoint can be found here
- Handover
To perform a handover- REST API Documentation for this endpoint can be found here
- Close Chat
-
Callback API/Endpoint
This Endpoint is needed when the App runs in
Asynchronous / Callback Modemode. You will have to copy this url tocredentials.ymlfile.
Adding Quick Replies support to your Rasa Bot
- Rasa App provides out of the box support for quick replies. To add quick-replies, you can follow the structure defined in Rasa here