This Python script is from a YouTube tutorial on Brutfab's channel, focusing on beginners using the OpenAI API.
There are 2 different methods you can use to access the OpenAI API:
Pt1 The first method is to use the OpenAI python library, in which I provided examples in the pt1 directory
Pt2 The second method is to access through a direct HTTP request. You can check out the example in the pt2 directory.
Pt3 Includes examples for building a customized chatbot using openai api.
Setup: Initializes the OpenAI API using the API key loaded from a .env
file.
change the .env.template
file to .env
and put your openai api key
To follow along with the full tutorial, watch it on Brutfab.