To install, make sure you install the openai CLI:
pip3 install openai- Run
which openaito get the full path of where the executable is - Copy the path and replace
/opt/homebrew/bin/openaiin the script with your path if it's different - Update
set OPENAI_API_KEY to "xxx"to use your OpenAI key
To use GPT3.5-turbo instead of gpt-4, change /opt/homebrew/bin/openai api chat_completions.create -m gpt-4 to -m gpt-3.5-turbo or other model with larger context window.