This is a wrapper around chatGPT so that you can access the platform via text message.
This app requires both a Twilio account and an OpenAI account for this to work. All credentials are stored in a .env
file.
- Activate your python virtual environment:
python3 -m venv <path to project directory>
- Run
pip3 install -r requirements.txt
to install project dependencies - Run
mv .env.example .env
create your.env
file
- Go to https://chat.openai.com and log in or sign up
- Open your developer console with
F12
- Open the
Application
tab and clickCookies
- Copy the value for
__Secret-nextauth.session-token
and paste it to the.env
file that you have just created underSESSION_TOKEN
.
- Go to https://www.twilio.com/ and make a Twilio account.
- Go to your twilio console and you'll see your Twilio SID and secret token.
- Copy and paste them in your
.env
file asTWILIO_SID
andTWILIO_TOKEN
accordingly.
Once your app is publically hosted, you need to buy a Twilio phone number add your url to your Twilio SMS response webhook.
- Buy a Twilio phone number
- In the phone number settings add your webhook urls. The response webhook should be in the format
https://example.com/sms
and the failure webhook is in the formathttps://example.com/timeout
I have a hosted version of the application working. Message me if you would like to text the number that I'm hosting. Works in both Canada and the US