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

Issue with API's #6

Open
DrewPear309 opened this issue Apr 16, 2024 · 2 comments
Open

Issue with API's #6

DrewPear309 opened this issue Apr 16, 2024 · 2 comments

Comments

@DrewPear309
Copy link

I keep getting this error regardless of the API i use. Groq or OpenAI gives the same respective error.

(venv) PS C:\qagent> python quickagent.py
Python-dotenv could not parse statement starting at line 1
Traceback (most recent call last):
File "C:\qagent\quickagent.py", line 218, in
manager = ConversationManager()
^^^^^^^^^^^^^^^^^^^^^
File "C:\qagent\quickagent.py", line 195, in init
self.llm = LanguageModelProcessor()
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\qagent\quickagent.py", line 34, in init
self.llm = ChatOpenAI(temperature=0, model_name="gpt-4-0125-preview", openai_api_key=os.getenv("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"))

File "C:\qagent\venv\Lib\site-packages\langchain_core\load\serializable.py", line 120, in init
super().init(**kwargs)
File "C:\qagent\venv\Lib\site-packages\pydantic\v1\main.py", line 341, in init
raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for ChatOpenAI
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)

@tazei186
Copy link

same issue

@gkamradt
Copy link
Owner

gkamradt commented Apr 23, 2024 via email

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

3 participants