-
Notifications
You must be signed in to change notification settings - Fork 16.2k
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
OpenAIEmbeddings #13082
Comments
🤖 Hello @paritoshk, Nice to meet you! I'm a bot designed to assist with issues related to the LangChain repository. While we're waiting for a human maintainer, I'm here to help you troubleshoot bugs, answer any questions you have, and even guide you on how to contribute to the project. I'm currently reviewing the issue you've posted and will provide a comprehensive response shortly. Thanks for your patience! |
🤖 Based on the traceback you provided, it seems like the error is occurring when you're trying to initialize the From the context provided, it appears that there have been similar issues in the past where the OpenAI API key was not correctly set or the OpenAI Python package was not available. The Here are a few things you could check:
If you've checked all of these and the issue still persists, it would be helpful if you could provide more information about your environment and the exact steps you're following when the error occurs. This would help in diagnosing the issue further. As for the changes in the OpenAI API, I wasn't able to find specific information about this in the LangChain repository. However, you mentioned that OpenAI has changed the code. Could you provide more details about these changes? This could help in understanding if they are related to the issue you're experiencing. Regarding the I hope this helps! Let me know if you have any other questions or if there's anything else I can do to assist you. Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
@paritoshk do you still see this with |
Hi, @paritoshk, I'm helping the LangChain team manage their backlog and am marking this issue as stale. From what I understand, you raised an issue regarding a traceback error in the OpenAIEmbeddings module and sought assistance from @agola11. There have been responses from @dosubot and @baskaryan, with troubleshooting suggestions and a query about the error persisting with a specific version of LangChain. Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, kindly let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you! |
System Info
Traceback:
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 534, in _run_script
exec(code, module.dict)
File "/app/demo-chatbot/updatedapp.py", line 351, in
asyncio.run(main())
File "/usr/local/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
return future.result()
File "/app/demo-chatbot/updatedapp.py", line 214, in main
vectors = file.get_vector()
File "/app/demo-chatbot/file.py", line 39, in get_vector
self.save_vector()
File "/app/demo-chatbot/file.py", line 30, in save_vector
embeddings = OpenAIEmbeddings(openai_api_key=st.secrets["OPEN_AI_KEY"])
File "pydantic/main.py", line 339, in pydantic.main.BaseModel.init
File "pydantic/main.py", line 1102, in pydantic.main.validate_model
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 166, in validate_environment
values["client"] = openai.Embedding
Who can help?
@agola11 OpenAI changed the code https://platform.openai.com/docs/guides/embeddings/what-are-embeddings
Information
Related Components
Reproduction
Just follow a funciton similar to
Expected behavior
No traceback adding .create
The text was updated successfully, but these errors were encountered: