Skip to content

Did not find openai_api_key, #14

@5odead

Description

@5odead

Im running this on Windows 10
I added the API KEY in the .env file but i keep getting this error
ValidationError: 1 validation error for OpenAIEmbeddings __root__ Did not find openai_api_key, please add an environment variable OPENAI_API_KEYwhich contains it, or passopenai_api_key as a named parameter. (type=value_error) Traceback: File "C:\Users\DELL\AppData\Local\Programs\Python\Python311\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 565, in _run_script exec(code, module.__dict__) File "C:\Users\DELL\Desktop\Projects\langchain-ask-pdf-main\app.py", line 55, in <module> main() File "C:\Users\DELL\Desktop\Projects\langchain-ask-pdf-main\app.py", line 37, in main embeddings = OpenAIEmbeddings() ^^^^^^^^^^^^^^^^^^ File "pydantic\main.py", line 341, in pydantic.main.BaseModel.__init__

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions