Skip to content
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

llama_index 跟 pydantic v1不兼容,本地启动报错 #730

Open
LillyChen opened this issue Jul 5, 2024 · 2 comments
Open

llama_index 跟 pydantic v1不兼容,本地启动报错 #730

LillyChen opened this issue Jul 5, 2024 · 2 comments

Comments

@LillyChen
Copy link

LillyChen commented Jul 5, 2024

from pydantic import BaseModel, ConfigDict, Extra, Field, Json, model_validator
ImportError: cannot import name 'model_validator' from 'pydantic' (D:\Python\Python311\Lib\site-packages\pydantic_init_.cp311-win_amd64.pyd)

看着是 from llama_index.node_parser import SimpleNodeParser 引入了 pydantic v2版本 但是bisheng-langchan pydantic 是v1版本 ,pydantic 升级成 v2 还会出现其他错误

bisheng版本 0.3.2.1

@yaojin3616
Copy link
Collaborator

是的。 pydantic v2 有更多代码要求,目前直接升级是有问题的。

llama_index 是我们自定义开发的内容吗?

@LillyChen
Copy link
Author

现有的逻辑,不是新增的内容, 后来将报错的那个地方直接加上v2就可以啦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants