Demo Application

Let's explore a demo Flask application that we have integrated with OpenAI API.

We'll cover the following...

In this lesson, we’ll present an example Flask application to integrate the chat completions endpoint of OpenAI API.

Press + to interact
Demo application
Demo application

Workflow

Let’s first look at the workflow of the application:

  1. When we run the application, the home page appears. The home page has two sections with buttons to navigate the other pages – “Chat completions” and “Specific Tasks.”

  2. The “Completions” button takes us to the page to design our own prompt and get results from the OpenAI API. We need to select the model and enter the prompt. We can then click the “Submit” button to fetch the response from the completions API. ...