I have exported my API key in bash as OPENAI_API_KEY="sk***"
Alternatively, you can provide a token using environment variable OPENAPI_API_KEY. How to set it depends on your shell, i.e.
- for bash shell, add export OPENAPI_API_KEY=<your-api-key> to your ~/.bash_profile
It might be nice to support OPENAI_API_KEY name as that is the default set out by openai. This in particular for those who already have the openai package on their system for other purposes. Workaround is easy though:
@gsmitheidw ouch! Thank you for this. This is a typo. It meant to be openAI, not openAPI. Thank you for picking this up, will be fixed in the next release!
I have exported my API key in bash as OPENAI_API_KEY="sk***"
It might be nice to support OPENAI_API_KEY name as that is the default set out by openai. This in particular for those who already have the openai package on their system for other purposes. Workaround is easy though:
export OPENAPI_API_KEY=$OPENAI_API_KEY