Multi pdf chat with LLM model

2023-08-01 13:26:20.183 Uncaught app exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/streamlit/runtime/scriptrunner/", line 565, in _run_script
exec(code, module.__dict__)
File "/content/ask-multiple-pdfs/", line 104, in <module>
File "/content/ask-multiple-pdfs/", line 96, in main
vectorstore = get_vectorstore(text_chunks)
File "/content/ask-multiple-pdfs/", line 34, in get_vectorstore
embeddings = OpenAIEmbeddings()
File "pydantic/", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for OpenAIEmbeddings
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)

hello everyone , i already given open api key , still i am getting error kindly solve the error(edited)

How have you added your API key? You should preferably add it as an environment variable in your virtual environment