Fix: missing parent chunk issue. (#12789)

### What problem does this PR solve?

Close #12783

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu
2026-01-23 12:54:08 +08:00
committed by GitHub
parent 678392c040
commit 08c01b76d5
4 changed files with 5 additions and 1 deletions

View File

@ -147,7 +147,7 @@ class Categorize(LLM, ABC):
category_counts[c] = count
cpn_ids = list(self._param.category_description.items())[-1][1]["to"]
max_category = list(self._param.category_description.keys())[0]
max_category = list(self._param.category_description.keys())[-1]
if any(category_counts.values()):
max_category = max(category_counts.items(), key=lambda x: x[1])[0]
cpn_ids = self._param.category_description[max_category]["to"]