Interact with OpenAI's ChatGPT API via the command line.
- Python 3
- The
openai
package (pip install openai
) - An OpenAI API key (get one for free here)
- The
dotenv
package (pip install dotenv
)
- Add your OpenAI API key to a
.env
file (see the provided.env.example
for the correct format). - Run
python script.py
. - Enter messages and see ChatGPT's responses!
The model used is gpt-3.5-turbo
.
This project is licensed under the MIT License.