A simple script to get started with the OpenAI API to use the Chat-GPT model.
Here are the simple steps to get started:
- Download the OpenAI API:
pip install openai
- Obtain your OpenAI API key from https://platform.openai.com/account/api-keys and set it as an environment variable:
export OPENAI_API_KEY = "your_openai_api_key"
-
Edit the system instructions in
main.py
to alter the chat-bot's behaviour. -
Run the script:
python main.py