-
Book Overview & Buying
-
Table Of Contents
OpenAI API Cookbook
By :
As discussed previously, there are many important benefits of creating your own public endpoint server that calls the OpenAI API, instead of connecting to the OpenAI API directly – the biggest being control and customization, which we will explore in this recipe and the next recipe.
In this recipe, we will use GCP to host our public endpoint. When this endpoint is called, it will make a request to OpenAI for a slogan for an ice cream company and then will return the answer to the user. This sounds simple and almost unnecessary to make a public endpoint, but it is the final step we need to build a truly intelligent application that leverages OpenAI.
To do this, we will create a GCP resource called Cloud Functions, which we will explore later in the How it works… section of the recipe.
Ensure you have an OpenAI platform account with available usage credits. If you don’t, please...