-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
A ton of Bugs after OpenAI API update today #12956
Comments
🤖 Hello @Vanekkk1, Great to see you back here! I hope you're doing well. I'm already on your issue and will provide a thorough response shortly. |
🤖 Based on the information provided, it seems like the OpenAI package might be outdated. The error message suggests that the 'ChatCompletion' attribute is not found in the 'openai' package. This could be due to an older version of the package being used. You can resolve this by upgrading the OpenAI package. You can do this by running the following command in your terminal: pip install --upgrade openai This solution was suggested in a similar issue As for the 'ValidationError' in 'main.py', there is no context provided for this error in the given context. Therefore, I cannot provide a solution for this error. Please provide the relevant context or code snippet where the 'ValidationError' is occurring for further assistance. As for the changes in the latest OpenAI API update that could have caused these bugs, I wasn't able to find specific information within the LangChain repository. It's possible that the update introduced changes that are incompatible with the current version of LangChain. It would be helpful to review the OpenAI API update notes to understand what changes were made. 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. |
@dosu-bot |
Hi, the same happened to me since I did not have fixed versions in requirements file. What worked was to install |
I checked in #12967 that using openai-python might have changed their API at the recent v1 bump. |
Thanks @vanduyta and @dosuken123. it worked for me too |
- Limited the version of openai dependency to <=0.28.1 in pyproject.toml This is a temporary change. See LangChain: langchain-ai/langchain#12956 for more context. tl;dr: OpenAI's update breaks a lot of LangChain.
Its work, thanks man |
This could be due to the new 'client' model of the OpenAI API in v1.1.0+ |
My issue was: ValueError: Expected EmbeddingFunction.call to have the following signature: odict_keys(['self', 'input']), got odict_keys(['self', 'args', 'kwargs']) |
System Info
all last versions as of 6/11/2023
Who can help?
No response
Information
Related Components
Reproduction
Run anything with OpeanAI ChatCompletions and Embeddings
Expected behavior
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/embeddings/openai.py", line 284, in validate_environment
values["client"] = openai.Embedding
^^^^^^^^^^^^^^^^
AttributeError: module 'openai' has no attribute 'Embedding'. Did you mean: 'embeddings'?
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/langchain/load/serializable.py", line 97, in init
super().init(**kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pydantic/v1/main.py", line 341, in init
raise validation_error
pydantic.v1.error_wrappers.ValidationError: 1 validation error for ChatOpenAI
root
openai
has noChatCompletion
attribute, this is likely due to an old version of the openai package. Try upgrading it withpip install --upgrade openai
. (type=value_error)The text was updated successfully, but these errors were encountered: