This repository contains the code for chatbot. I have developed this chatbot using template based approach.
In oreder to run this you need forllowing libraries.
- flask
- flask_cors
- json
- os
- flask_pymongo
- pytz
- datetime
- uuid
-
OS, json, datetime and uuid are default python libraries
-
Install Flask libraries using following commands:
$ sudo pip install Flask==0.12.2
$ sudo pip Flask-Cors==3.0.2
$ sudo Flask-PyMongo==0.5.1
- Installlation of pytz library
$ sudo pip install pytz==2017.2
- Install MongoDB NoSQL db by following this step.
$ sudo apt-key adv --keyserver hkp:https://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
$ echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
$ sudo apt-get update
$ sudo apt-get install -y mongodb-org
$ sudo service mongod start
-
First run
flaskengin.py
-
Go to the URL:
-
https://0.0.0.0:5002/
where you can see Hello from chatbot Flask! -
You can see the chatbot JSON response by using this URL:
https://0.0.0.0:5002/welcomemsg_chat
-
After that you can hit the following urls
https://0.0.0.0:5002/hi_chat?msg=Hi
https://0.0.0.0:5002/asking_borowers_full_name?msg=<your name>
https://0.0.0.0:5002/asking_borowers_email_id?msg=<Your email address>