You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在构建知识图谱类型的知识库时,上传文件后,进行文件同步时报错
document embedding failed<SchemaNotReadyException: (code=1, message=Collection 'test1_CHUNK_HISTORY' not exist, or you can pass in schema to create one.)>
Search before asking
Operating system information
Windows
Python version information
DB-GPT version
main
Related scenes
Installation Information
Installation From Source
Docker Installation
Docker Compose Installation
Cluster Installation
AutoDL Image
Other
Device information
GPU
GPU Count:1
gpu memory:24G
Models information
LLM_MODEL: qwen2.5-7b-instruct
EMBEDDING_MODEL:m3e-base
What happened
在构建知识图谱类型的知识库时,上传文件后,进行文件同步时报错
document embedding failed<SchemaNotReadyException: (code=1, message=Collection 'test1_CHUNK_HISTORY' not exist, or you can pass in schema to create one.)>
What you expected to happen
报错信息来自于milvus_store.py文件中的similar_search_with_scores方法(我使用的向量数据库时milvus),它是由graph_extrator.py的aload_chunk_context方法会调用的,我认为这里的代码逻辑是有缺陷的,在milvus中的collection还没创建的时候,就先调用了similar_search_with_scores方法,而该方法的实现逻辑里并没有判断collection是否存在,所以导致报错提示collection不存在。
修复建议,在similar_search_with_scores方法中增加判断collection是否存在的代码。
原代码如下:
修复后的代码如下:
How to reproduce
1.构建一个知识图谱类型的知识库;
2.上传一个文件;
3.选择上传的文件,点击"同步"
Additional context
No response
Are you willing to submit PR?
The text was updated successfully, but these errors were encountered: