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

Error upon running main.py #3

Open
DrewPear309 opened this issue Jun 6, 2023 · 1 comment · May be fixed by #4
Open

Error upon running main.py #3

DrewPear309 opened this issue Jun 6, 2023 · 1 comment · May be fixed by #4

Comments

@DrewPear309
Copy link

(venv) Z:\vrsen\langchain-agents-tutorial>python main.py
Traceback (most recent call last):
File "Z:\vrsen\langchain-agents-tutorial\main.py", line 79, in
llm = OpenAI(temperature=0)
^^^^^^^^^^^^^^^^^^^^^
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 pass openai_api_key as a named parameter. (type=value_error)

my main.py file for elevenlabs & openai looks like this.

set_api_key("394678259106033b070d43dbc9ab6ebd")
openai.api_key ="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"

(numbers have been changed)

Thank you!

@wealthypotato
Copy link

have we had any luck in fixing this issue?

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