New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OPENAI_API_KEY ? #171
Comments
|
I must use the |
I'm having the same issue, I have loaded my .env key into the /home/user/anaconda3/envs/openvoice/lib/python3.9/site-packages/openai directory, /home/user/Documents/GitHub/OpenVoice/ and the /home/user/Documents/OpenVoiceTest (this where my python script is to convert the text) directory. But I keep getting the same error as described above:
This is my code:
Does anyone know where I am going wrong? |
OK, I have figured it out, I think. I have found the relevent alternative to this using Ubuntu via XDA Developers. I have so far run export OPENAI_API_KEY="sk-the rest of my key" Looking at the guide, it looks like this has to be set each time, but there is a permanent way of setting it using /etc/environment. This is the guide I found https://www.xda-developers.com/set-environment-variable-in-ubuntu/ |
run the demo_part2.ipynb.
/lib/python3.10/site-packages/openai/_client.py", line 100, in init
raise OpenAIError(
openai.OpenAIError: The api_key client option must be set either by passing api_key to the client or by setting the OPENAI_API_KEY environment variable
how to slove it,tks
The text was updated successfully, but these errors were encountered: