Technical requirements
For all the recipes in this chapter, the following steps are common and mandatory:
- We will use a library called
openai
, which is the official Python library provided by OpenAI for working with GPT:$ pip install openai
- We will also need an API key from the OpenAI website, which is necessary to make any API call for using GPT. For this, simply create an account at platform.openai.com and then navigate to Settings to create your API key. The following is a screenshot demonstrating the same:
Figure 13.1 – API keys on OpenAI for using GPT
Tip
Be mindful that GPT by OpenAI is a paid tool and, as of writing this book, there is a small grant of 5 USD given with each account for a period of 3 months to experiment and get acquainted with the APIs. Once the limit is exhausted, you would have to opt for a paid plan. Read more about pricing at https://openai.com/pricing.