
Install the latest Python from python.org, verify the version is above 3.7.0, and install Visual Studio Code; then pin Terminal and Visual Studio Code to your dock for easy access.
Create a new folder named Chatgpt text, open it in Visual Studio Code, and add App Dot Pie, requirements dot txt, and a Proc file for the web app.
Create a requirements.txt listing Twilio, OpenAI, Flask, and Gunicorn, then install them with sudo pip3 install Twilio OpenAI Flask Gunicorn to enable text messaging and a ChatGPT-powered web app.
Modify the Heroku procfile with boilerplate commands, including web: gunicorn and app: app, to ensure the app runs correctly on that platform.
Import Flask and request, create app = Flask(__name__), and run the app with debug=True to establish the initial Flask boilerplate.
Import Twilio Twiml messaging response and set up a /sms route to handle get and post requests, parse inbound body and from, and reply with a hello message using MessagingResponse.
Leverage Heroku environment variables to securely bind a Twilio from phone number, validating incoming texts and preventing unauthorized access to your ChatGPT API tokens.
Learn to implement the OpenAI chat completion API in a Python app, configuring the OpenAI API key, using GPT-3.5-turbo, and sending/receiving SMS-style responses with a system and user messages.
Install git and homebrew on macOS via terminal, then install heroku with brew taps and brew install to set up the environment; Windows has a separate video.
Sign up for a Heroku account, navigate to the dashboard, and create a new app with a unique name to deploy your project to the cloud.
Set up a Twilio account for SMS, obtain a US toll-free number, create a Chatgpt bot messaging service, and configure a webhook to a Heroku app to reply to texts.
create and copy your OpenAI API key, keep it private, then save it as openai_api_key in your Heroku project, and add an allowed_phone_number with country code.
Deploy a python app to cloud with Heroku, initialize a git repo, add and commit, push to Heroku, then use the Twilio webhook to reply to inbound texts with ChatGPT.
Test the chatgpt messaging app by wiring a Twilio phone number to an sms webhook, sending tests, and reviewing logs in Heroku and Twilio for debugging.
Updated for the new ChatGPT 3.5 Turbo API in 2023!
This course has been revamped to include the latest ChatGPT Turbo API on March 1st, 2023! The Turbo API is optimized for Chat and is far less expensive than its previous counterpart.
Are you interested in taking your Python skills to the next level?
Python is the future of software development. ChatGPT is the future of Artificial Intelligence. Combine both of these in this course and learn how to build a text message bot.
We will look at the latest version of the ChatGPT API and make it easy to text with it from anywhere. Don't waste time logging on to a desktop computer, interact with ChatGPT on the go!
Hear what Students From My Other Courses Have To Say
"Great course! I love Python and Crypto and this makes perfect combination! Please make more courses similar to this!"
"Great course for those interested in Python and/or Crypto"
Who is this for?
This course is for anyone who wants to take their skills to the next level. Python is a programming language that many believe to be the future of software development, and ChatGPT is revolutionizing AI and the internet as we know it.