Langchain module ‘hnswlib‘ has no attribute ‘Index‘ 错误解决

Langchain module 'hnswlib' has no attribute 'Index' 错误解决

使用 Langchain 操作 Chroma 向量数据库时,报一下错误信息,

module 'hnswlib' has no attribute 'Index'

试着重装了不同 hnswlib 版本没有解决,最后解决方法是,不要使用 hnswlib,使用 chroma-hnswlib,

pip uninstall hnswlib
pip install chroma-hnswlib

完结!

猜你喜欢

转载自blog.csdn.net/engchina/article/details/132197081