Fix bug over chunks classification by document in the promp (#4156)

The refactor in 0.15 contains a small bug that eliminate the
classification

### What problem does this PR solve

### Type of change

- [X] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
devMls 2024-12-23 03:22:57 +01:00 committed by GitHub
parent f13f503952
commit 96da618b6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -124,7 +124,7 @@ def kb_prompt(kbinfos, max_tokens):
for i, ck in enumerate(kbinfos["chunks"]): for i, ck in enumerate(kbinfos["chunks"]):
if i >= chunks_num: if i >= chunks_num:
break break
doc2chunks["docnm_kwd"].append(ck["content_with_weight"]) doc2chunks[ck["docnm_kwd"]].append(ck["content_with_weight"])
knowledges = [] knowledges = []
for nm, chunks in doc2chunks.items(): for nm, chunks in doc2chunks.items():