A SMS-based chatbot engine built using the GPT3 Language model. It allows users to chat with an AI machine through SMS.
- Clone the git repository or download the ZIP file.
- Get the access token from the OpenAI - https://beta.openai.com/
- Create a file called .env in your root directory and insert the code you received from the OpenAI
OPENAI_KEY=<your_secret_key>
- Create a trial account in twilio to get a registered phone number.
- After creating the account, purchase a phone number.
- Install relevant files by typing the following command in your terminal
pip install twilio openai python-dotenv flask ngrok
- Run the application
python app.py
- As your application is running on a local server, it is not reachable by the twilio server. To fix this, open another terminal and then type the following command in your terminal
ngrok http 5000
- Copy the forwarding url present in the terminal and go to your twilio console. Then click on your phone number and scroll down to the messaging section.
- In the 'A MESSAGE COMES IN" webhook, paste your forwarding url.
- Start sending SMS to your newly authorised phone number.
If you have any questions, feel free to reach out. My contact details are on my profile.
#happyCoding #GTP3Engine