Langchain module 'hnswlib' has no attribute 'Index' error resolution

Langchain module 'hnswlib' has no attribute 'Index' error resolution

When using Langchain to operate the Chroma vector database, an error message is reported,

module 'hnswlib' has no attribute 'Index'

Trying to reinstall different hnswlib versions did not solve the problem. The final solution is not to use hnswlib, but to use chroma-hnswlib.

pip uninstall hnswlib
pip install chroma-hnswlib

end!

Guess you like

Origin blog.csdn.net/engchina/article/details/132197081