niuwz / Ming-Dynasty-ChatBot

本项目基于LangChain和GLM-4搭建了一个明史知识问答小助手,收集了包括《明史简述》和《朱元璋传》等材料,利用RAG回答有关问题。
https://modelscope.cn/studios/sleep10h1d/History-Chat-Bot
Apache License 2.0
1 stars 0 forks source link

你好,想问一下chromadb的版本是多少呢 #3

Open Mliyifei opened 3 months ago

niuwz commented 3 months ago

您好,我这里一些相关库的版本是chroma-hnswlib==0.7.3以及chromadb==0.5.3

Mliyifei commented 3 months ago

我运行的chromadb==0.5.3会产生以下报错: ValueError: Expected EmbeddingFunction.call to have the following signature: odict_keys(['self', 'input']), got odict_keys(['self', 'args', 'kwargs']) Please see https://docs.trychroma.com/guides/embeddings for details of the EmbeddingFunction interface. Please note the recent change to the EmbeddingFunction interface: https://docs.trychroma.com/deployment/migration#migration-to-0.4.16---november-7,-2023 看了一下chromadb 降级到 0.4.15 可以解决问题,但是又回产生sqlite3数据库的问题

niuwz commented 3 months ago

您好,因为我也是一个初学者,您在0.5.3下出现这个问题我没有遇到过,也不是很清楚具体原因。刚刚我尝试降级以后确实出现了sqlite相关问题,但是很遗憾也没有找到解决方法。目前我能想到的一些尝试方法是根据文档重新生成一下向量数据库或者换一个向量数据库例如FAISS这种。

Mliyifei commented 3 months ago

解决了,与 Chroma 更新至 0.4.16 版本有关,LangChain 仍采用旧接口。LangChain 版本 0.0.332 已发布,修复了与 chromadb>=0.4.16 的兼容性问题。通过:pip install -U langchain chromadb命令可以进行该bug 注:chromadb==0.5.3