This is a whatsapp chatbot using Openai's GPT-3, python, twilio and flask
Installation:
- Flask
- Openai
- python-dotenv
- pyngrok
- Twilio
Mac Os
$ cd kaybot
$ python3 -m venv venv
$ source venv/bin/activate
(venv) $ pip install openai twilio flask python-dotenv pyngrok
Windows
$ cd kaybot
$ python -m venv venv
$ venv\Scripts\activate
(venv) $ pip install openai twilio flask python-dotenv pyngrok
This line of code are the packages/modules we are going to need to make our chatbot a success. This uses the pip
command which is the python package manager.
(venv) $ pip install openai twilio flask python-dotenv pyngrok
Accounts needed for a successfull application
-
An OPENAI Account, this helps you to get the OPENAI_API KEY to be able to use the GTP-3 model. You can request access for the beta here OPENAI Beta.
-
A Twilio Account to use their Whatsapp Sandbox
-
An ngrok Account use their api to help configure a localhost address that can be use via
Https
. The<URL>
generated from the command line usingngrok http 500
will be used on Twilio to access your application locally.