- RASA is an opensource framework for building AI-powered chatbots. You can use RASA to create awesome bots for various channels such as Facebook, Telegram, Slack, etc.Here i have created a Automated chatBot for covid-19 cases using whatsappApi ,Rasa and Twilio.
- How to install Rasa Installation
- Clone/Download the repo.https://github.com/Tharun-Mamillapalli/Rasa-Bot.git
- cd into folder.
- Run
rasa init
. - Change the values in
data/nlu.md
your NLU training data, data/stories.md
your stories,domain.yml
your assistant’s domain,actions.py
code for your custom actions,credentials.yml
details for connecting to other services,endpoints.yml
details for connecting to channels like fb messenger,to suit your use-case.
- "https://api.covid19india.org/data.json"
- Run
conda activate rasa
to activate rasa environment . - Run
rasa train
to train the updated data. - Run
rasa run actions
in the another terminal simultaneously . - Run
rasa shell
to start a chat session with your assistant .
- How to install Rasax Installation.
- Install Rasax and run
rasax
to deploy your assistant on local host.
- Twilio provides a telephony infrastructure web service in the cloud, allowing web developers to integrate phone calls, text messages and IP voice communications
- Signup for a Twilio account Here
- Create a Project
- Enable Whatsapp sandbox under Programmable SMS.Here.
- Add Twilio channel to your RASA
credentials.yml
.More info here. twilio:
account_sid: "<TWILIO ACCOUNT ID>"
auth_token: "<TWILIO AUTH TOKEN>"
twilio_number: "whatsapp:<TWILIO NUMBER>"
.- Launch your rasa instance. You can use ngrok to get a public https URL for your bot instance. More info Here.
./ngrok http 5005; rasa run
.https://<your id>.ngrok.io/webhooks/facebook/webhook
- Add your Rasa Twilio Webhook to Sandbox configuration .
- And also add webhook in the message callback Here
- Finally follow the instruction to join the WhatsApp sandbox from your mobile number Here.
- Now you have your RASA bot integrated with Whatsapp.