-
Book Overview & Buying
-
Table Of Contents
Building AI Applications with OpenAI APIs - Second Edition
By :
Let’s first dive into the ChatGPT API requests and learn how to build your project and the app.py file. In this project, we will explore how to make multiple ChatGPT API requests to get the explanations and fixed code for our input queries. We will go through each step of the process and provide clear examples, so you can follow along with ease.
To fix users’ code, ChatGPT needs two key components: some buggy code and the error provided by the system. The idea behind the Code Bug Fixer application is that you provide ChatGPT with two separate requests simultaneously (see Figure 3.1):
Figure 3.1 – Code Bug Fixer request/response map
As shown in Figure 3.2, the design of the Code Bug Fixer app is a web application...