-
Notifications
You must be signed in to change notification settings - Fork 15.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
AttributeError: 'OpenAIEmbeddings' object has no attribute 'deployment' #3251
Comments
In my experience, the problem has occurred since version 0.0.145. I do not know the cause. You can do a downgrade to version 0.0.144. |
Getting this error after downgrading: TypeError: IndexFlat.search() missing 3 required positional arguments: 'k', 'distances', and 'labels' Seems to be a regression issue |
@gullerg The Unless, you have saved the object created with an older version of LangChain in a file or something, and loaded it back with a newer version. That way, the |
I'm guessing the fix is downgrading to |
Thank you for the explanation. But may I ask if there is any way to update the old version files without re-run all these embeddings process? |
I solved this issue in my fork.
# -------------------------------------
# azure
# -------------------------------------
os.environ["OPENAI_API_TYPE"] = "azure"
os.environ["OPENAI_API_KEY"] = settings.OPENAI_AZURE_TOKEN
os.environ["OPENAI_API_BASE"] = settings.OPENAI_AZURE_API
os.environ["OPENAI_API_VERSION"] = "2023-05-15"
os.environ["OPENAI_EMBEDDINGS_DEPLOYMENT"] = "embedding"
# ------------------------------------- done |
we havent been maintaining compatability with old FAISS versions. the current save/load methods are only garunteed to work with the version they were created with. we'll work on proper forward-compatible serialization of those components at some point - its on our todo list |
Hi, @gullerg! I'm Dosu, and I'm helping the LangChain team manage their backlog. I wanted to let you know that we are marking this issue as stale. Based on my understanding of the current state of the issue, you encountered an AttributeError when deploying LangChain to DigitalOcean. MariuszT suggested downgrading to version 0.0.144, but you encountered a TypeError after doing so. AliMirlou explained that the issue arises from a specific PR and suggested creating a new object from it. Laisky asked if there is a way to update old version files without re-running the embeddings process and also provided a solution in their fork of the repository, involving uninstalling and reinstalling LangChain and adding a new environment variable. hwchase17 acknowledged the issue and mentioned that they will work on forward-compatible serialization. It seems that the issue has been resolved by Laisky's solution in their fork of the repository. The solution involves uninstalling and reinstalling LangChain and adding a new environment variable. Before we close this issue, could you please let us know if it is still relevant to the latest version of the LangChain repository? If it is, please comment on this issue to let us know. Otherwise, feel free to close the issue yourself or it will be automatically closed in 7 days. Thank you for your contribution to LangChain! |
get this error AttributeError: 'OpenAIEmbeddings' object has no attribute 'deployment' when deploying LangChain to DigitalOcean - however I don't get it locally.
It seems rather odd, as when going through the source code, OpenAIEmbeddings indeed seem to have a 'deployment' attribute. What could cause this?
The text was updated successfully, but these errors were encountered: