Find answers from the community

Updated 4 months ago

Hi there! I spotted a small bug within

Hi there! I spotted a small bug within the new llama-index v0.11.0. Migrating Pydantic v1 -> v2 now root_validator is deprecated and model_validator should be used instead. This changes was not performed within llama-index-embeddings-azure-openai package, so when importing the AzureOpenAIEmbedding class the following error raises:
Plain Text
File "[...]/llama_index/embeddings/azure_openai/base.py", line 4, in <module>
    from llama_index.core.bridge.pydantic import Field, PrivateAttr, root_validator
ImportError: cannot import name 'root_validator' from 'llama_index.core.bridge.pydantic' ([...]/llama_index/core/bridge/pydantic.py)

Just a heads-up before updating if you depend on this sub-package!
L
L
6 comments
pip install -U llama-index-embeddings-openai llama-index-embeddings-azure-openai should fix the issue imo
I am already with the latest version of the subpackaes you listed me πŸ‘
I believe the changes was still nos carried out (checking the main files) https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/embeddings/llama-index-embeddings-azure-openai/llama_index/embeddings/azure_openai/base.py
oh weird, I see
Should be a quick fix, one sec
Should be published, if you update
Add a reply
Sign up and join the conversation on Discord