<<<<<<< HEAD
A simple chatbot built with Rasa and Twilio for engaging and following up leads using SMS or text message.
MIT License
Copyright (c) 2021
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The Tech Stack used when developing this ChatBot include: Tensorflow, NLP, RASA, Twilio API(python) and MongoDB(for data storage)
pip3 install --no-cache-dir rasa==2.8.2
pip3 install rasa-x==0.42.0 --extra-index-url https://pypi.rasa.com/simple
Follow the article below for installing MongoDB:
https://www.digitalocean.com/community/tutorials/how-to-install-mongodb-on-ubuntu-18-04-source
/usr/bin/mongod --config /etc/mongod.conf
sudo systemctl start mongod.service
sudo systemctl status mongod
sudo systemctl enable mongod
If can use Ngrok to forward and receive requests on to RASA server unning locally on your machine or server. Rmember to update the Ngrok URL or Link on Twilio's website.
snap install ngrok
./ngrok authtoken < "Your Token Here" >
cd chatbot
source chatbot/bin/activate
cd oncoreleads
sudo systemctl start mongod.service
sudo systemctl status mongod
export TWILIO_ACCOUNT_SID="<Twilio SID>"
export TWILIO_AUTH_TOKEN="<Twilio TOKEN>"
export TWILIO_SMS_FROM="<Twilio Phone Number>"
export MESSAGING_SERVICE_SID="<Message Service Sid>"
rasa run -m models --enable-api --credentials credentials.yml --endpoints endpoints.yml --cors "*"
rasa run actions
python3 sender.py
https://rasa.com/docs https://rasa.com/blog/connecting-a-rasa-assistant-to-twilio/ https://rasa.com/docs/rasa/connectors/twilio
The files below are used for training the ChatBot, programming it's logic and customizing its responses.
- domain.yml
- config.yml
- data/nlu.yml
- data/rules.yml
- data/stories.yml
- actions/actions.py
The files below are used for configuring Twilio API, MongoDB and Other Third Party APIs and Integrations
- credentials.yml
- endpoints.yml
Train a model in this repository with rasa train
- Call
rasa shell
to start interacting with the chatbot (alternatively, you can use Rasa X and interact with the bot via a developer GUI)
Our trained model is included in the models
directory.
initial commit