Get instant answers to your questions with a chatbot powered by Python, Twilio, Wikipedia, and Wolfram Alpha!
Check out the step-by-step YouTube tutorial here
Here are some examples of what you can do with this program:
To check out the full range of commands you can enter, visit the Wolfram Alpha website here and Wikipedia API documentation here
-
In order to run this program, you will need to follow these steps:
-
Download pip if you haven't already, from here
-
Download Ngrok here
-
Create a Twilio account here and follow the steps to obtain a phone number that you will be sending texts to
- Unfortunately, you will have to pay a minimum of $20 to upgrade your account to be able to use the phone number for this project
- Read more about sending SMS messages with Twilio here
-
Sign up for free API access of Wolfram Alpha here
- Follow the steps accordingly to obtain your AppID
-
-
If you do not have git installed, make sure to download it from here. Installing git will save you a lot of time installing files in the future
- Once you have git installed, run
git clone https://github.com/faizancodes/SATA-ChatBot.git
to download all the files from this repository.
- Once you have git installed, run
-
Then, run
cd SATA-Chatbot
to navigate to the corresponding folder with all the files you just downloaded and runpip install -r requirements.txt
to install all the necessary libraries for the program to run- If this gives you an error, run
python -m pip install -r requirements.txt
orpy -m pip install -r requirements.txt
and see if that works.
- If this gives you an error, run
-
Open the
sata_chatbot.py
file and change theapp_id
variable located on line 70 to your designated Wolfram Alpha AppID.
-
Run
sata_chatbot.py
to execute the code. -
When you run the code, your terminal should look like this:
-
Your Port Number is highlighted in the yellow box. In my case, it is 5000.
-
Next, you want to open up Ngrok and type in
ngrok http (port number)
. Replace "port number" inside the parentheses with your port number, in my case it would bengrok http 5000
. -
Your Ngrok should look like this:
-
Next, you want to copy the http address that is highlighted in the yellow box and navigate to your Twilio account screen.
-
Click the “#” on the top left of the screen, then click on your Twilio number, scroll down and enter the http address into the space that says “A message comes in”, as highlighted in the blue box. And make sure the dropdown is set to “webhook”
- Save your changes and you are now set!
- Message your Twilio number and test out the program!
If you are having any issues running the code, please refer to this link or contact me.