Skip to content
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 key error #130

Open
shaikansari opened this issue Jul 31, 2023 · 4 comments
Open

OpenAI key error #130

shaikansari opened this issue Jul 31, 2023 · 4 comments

Comments

@shaikansari
Copy link

I have fixed "NameError: name 'args' is not defined #125 " in my local, but I am getting another error now.

raise openai.error.AuthenticationError(
openai.error.AuthenticationError: No API key provided. You can set your API key in code using 'openai.api_key = ', or you can set the environment variable OPENAI_API_KEY=). If your API key is stored in a file, you can point the openai module at it with 'openai.api_key_path = '. You can generate API keys in the OpenAI web interface. See https://platform.openai.com/account/api-keys for details.

@sebastianmacias
Copy link

I'm having the same error after setting the .env file and running poetry run python main.py --prompt "a test case"

@tecworks-dev
Copy link

got it .env not working have to use
export OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxx

@Dhruvsahu98
Copy link

How is it working in windows ?

Below one is not working
image

@Dhruvsahu98
Copy link

It is working in windows via setting the OPENAI_API_KEY in the user environment variable and restart the pc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants