- I wanted to use
gpt-4
without usage limit, which is being applied when using website. - I wanted to conveniently use
gpt-3.5
andgpt-4
at the same time to ask questions according to their level of complexity.
- OpenAI Account with access to ChatGPT API Dashboard.
- Installed
Python 3.12
. - Installed
pipenv
.
- Create folder for script.
- Put
chatgpt_client.py
andPipfile
inside folder. - Run
pipenv shell
inside folder. - Run
pipenv install --skip-lock
inside folder. - Run
pipenv run python chatgpt_client.py
- (use--help
argument or read script instruction output below).
Usage: chatgpt_client.py [OPTIONS]
Options:
-gak, --gpt-api-key TEXT ChatGPT api key without exceeded quota -
provided either through cli argument or
environmental variable.
[env var: GPT_API_KEY; required]
-pi, --project-id TEXT Project id associated with your API Key.
[required]
-oi, --organization-id TEXT Organization id associated with your project
id. [required]
-gm, --gpt-model [gpt-3.5-turbo|gpt-3.5-turbo-instruct|gpt-4|gpt-4-32k]
Version of ChatGPT model to use. [default:
gpt-3.5-turbo]
--help Show this message and exit.