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

[Bug]: 知识库插件不可用,多处报错 #2073

Open
YunzhuoZHANG opened this issue Dec 10, 2024 · 0 comments
Open

[Bug]: 知识库插件不可用,多处报错 #2073

YunzhuoZHANG opened this issue Dec 10, 2024 · 0 comments

Comments

@YunzhuoZHANG
Copy link

Installation Method | 安装方法与平台

Anaconda (I used latest requirements.txt)

Version | 版本

Latest | 最新版

OS | 操作系统

Windows

Describe the bug | 简述

调用知识库插件时出现多处报错,且过久未更新。翻阅issues中有诸多相似问题,猜测是遇到了同样错误。我这里找到了一部分,尚未完全解决,还有待作者看这篇issue

知识库问答.py 64行from langchain.embeddings.huggingface import HuggingFaceEmbeddings 过时

知识库问答.py 65-66行 with ProxyNetworkActivate('Download_LLM'):
HuggingFaceEmbeddings(model_name="GanymedeNil/text2vec-large-chinese") 报错,No sentence-transformers model found with name GanymedeNil/text2vec-large-chinese. Creating a new one with mean pooling. 不知是不是huggingface调用时出问题。

vector_fns/vector_database.py 12行from langchain.vectorstores import FAISS 过时

vector_fns/general_file_loader.py 中from langchain.document_loaders import UnstructuredFileLoader 过时

以下更新后仍无法在普通anaconda命令行操作,必须在管理员权限下运行,且只能训练txt文本,训练markdown会卡住。

而且在训练txt文本后,使用“知识库文件注入”功能(这里名字应该也有错误,函数文件中原应该是“读取知识库作答”)仍有错误。
提示在vector_fns/vector_database.py 220行self.vector_store = FAISS.load_local(vs_path, text2vec)中添加参数allow_dangerous_deserialization=True。
在添加此参数后,重新运行程序,则训练文本又会卡住。

整个知识库函数均不可用,望作者mark并修复。

Screen Shot | 有帮助的截图

暂无截图,由于报错点过多,没有在修改时逐个保存报错代码截图,作者可以自行运行知识库函数并查看。

Terminal Traceback & Material to Help Reproduce Bugs | 终端traceback(如有) + 帮助我们复现的测试材料样本(如有)

见简述

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

1 participant