
Download and install Python from python.org, choose the current version (3.11.1), and add Python to path so you can run it anywhere. Then proceed to install Django and other tools.
Post a web form to a Django backend, handle CSRF protection, capture user input as question, and display it on the home page while preparing for the OpenAI API integration.
Learn how to set up an OpenAI API key, import the OpenAI library, and craft a completion request using the text-davinci-003 model with temperature, max_tokens, top_p, and penalties.
Wrap API calls in a try block and catch exceptions to render the home page with the error, preventing the app from dying when timeouts, connectivity, or overload occur.
Explore implementing pagination by exposing properties like has previous, current page, number of pages, has next, and next/previous page numbers to build navigation links.
Learn to implement numeric pagination in Django by creating a pages counter, looping through page numbers in templates, and wiring first, previous, next, and last links for navigation.
In this course I'll teach you how to make web apps for Django and Python, and how to connect those apps to the OpenAI Text Completion Artificial Intelligence API. You'll be surprised just how quickly you can create some pretty cool looking apps!
We'll use Python, Django, and the Bootstrap Framework to build a cool Chatbot app that connects to OpenAI.
You'll be able to type ChatGPT-like questions to straight from your app, and receive an OpenAI response that is output to the screen of your app.
We'll also use a database to save all of the questions and answers that you've typed into your app, and we'll query that database and output the answers on their own web page. We'll add stylish Pagination to the page as well so that you can page through the responses.
Finally, I'll discuss how to connect to OpenAI with an API Key, query the engine, and parse the responses in the correct way and output the answers to the homepage of your Django app.
If you've seen ChatGPT recently and want to learn how to use these tools programmatically, then this is the course for you!
We'll use the Bootstrap CSS Framework to make our Django web app look a little more modern and professional. This will allow us to make our site look great, very quickly and easily-- without knowing much about design.