-
Notifications
You must be signed in to change notification settings - Fork 34
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
failed to add API key #2
Comments
Hello @KangtanC,
Also, I would suggest you not to publish your API key publicly, so please edit your comment or revoke your key and create a new one with OpenAI. I hope this helps! |
Closing for now, feel free to reopen if needed. |
thank you very much, it's very helpful. The API key I've sent has deleted several numbers so it can't be used. |
Traceback (most recent call last):
File "/Users/aquaticdwarf/Downloads/chatPDF-main/main.py", line 99, in
ask(file)
File "/Users/aquaticdwarf/Downloads/chatPDF-main/main.py", line 38, in ask
llm_predictor = LLMPredictor(llm=OpenAI(temperature=0, model_name="text-davinci-003"))
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.init
pydantic.error_wrappers.ValidationError: 1 validation error for OpenAI
root
Did not find openai_api_key, please add an environment variable
OPENAI_API_KEY
which contains it, or passopenai_api_key
as a named parameter. (type=value_error)openai.api_key = os.environ["API_KEY"] = [REDACTED]
The text was updated successfully, but these errors were encountered: