This project is inspired by this tutorial. However, the code in the tutorial is outdated.
-
Install the OpenAI library:
pip install openai
-
Get an OpenAI API key from here.
-
Ensure you have a minimum balance of $10 USD on your OpenAI account. Note that this OpenAI account is separate from any paid ChatGPT subscription.
-
Set the
OPEN_AI_KEYenvironment variable with your paid API key.
Clone this repository using git:
git clone https://github.com/mika-data/chatGPT-HelloWorld.gitTest the code by running:
python helloWorld.pyYou should see the following output on the console:
1. Apple
2. Banana
3. Pear
4. Orange
5. Mango
6. Strawberry
7. Blueberry
8. Watermelon
9. Pineapple
10. Peach