瀏覽代碼

Fix: abnormal chunk id (#6506)

### What problem does this PR solve?

#6500

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.18.0
Kevin Hu 7 月之前
父節點
當前提交
b2b7ed8927
No account linked to committer's email address
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      api/apps/sdk/doc.py

+ 2
- 0
api/apps/sdk/doc.py 查看文件

@@ -917,6 +917,8 @@ def list_chunks(tenant_id, dataset_id, document_id):
res = {"total": 0, "chunks": [], "doc": renamed_doc}
if req.get("id"):
chunk = settings.docStoreConn.get(req.get("id"), search.index_name(tenant_id), [dataset_id])
if not chunk:
return get_result(message=f"Chunk not found: {dataset_id}/{req.get('id')}", code=settings.RetCode.NOT_FOUND)
k = []
for n in chunk.keys():
if re.search(r"(_vec$|_sm_|_tks|_ltks)", n):

Loading…
取消
儲存