Fix raptor issue (#3737)

### What problem does this PR solve?

#3732

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2024-11-29 11:55:41 +08:00
committed by GitHub
parent a0c0a957b4
commit 27cd765d6f
2 changed files with 18 additions and 14 deletions

View File

@ -344,7 +344,7 @@ def run_raptor(row, chat_mdl, embd_mdl, callback=None):
row["parser_config"]["raptor"]["threshold"]
)
original_length = len(chunks)
raptor(chunks, row["parser_config"]["raptor"]["random_seed"], callback)
chunks = raptor(chunks, row["parser_config"]["raptor"]["random_seed"], callback)
doc = {
"doc_id": row["doc_id"],
"kb_id": [str(row["kb_id"])],