Fix task_limiter in raptor.py (#8124)

### What problem does this PR solve?

Fix task_limiter in raptor.py

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Zhichang Yu
2025-06-09 10:18:03 +08:00
committed by GitHub
parent 5825a24d26
commit 1ed0b25910

View File

@ -151,8 +151,7 @@ class RecursiveAbstractiveProcessing4TreeOrganizedRetrieval:
for c in range(n_clusters):
ck_idx = [i + start for i in range(len(lbls)) if lbls[i] == c]
assert len(ck_idx) > 0
async with chat_limiter:
nursery.start_soon(summarize, ck_idx)
nursery.start_soon(summarize, ck_idx)
assert len(chunks) - end == n_clusters, "{} vs. {}".format(
len(chunks) - end, n_clusters