fix: preserve raptor tree titles (#17772)

This commit is contained in:
buua436
2026-08-04 13:24:36 +08:00
committed by GitHub
parent 79a57d2126
commit bccbd7492c

View File

@@ -231,12 +231,14 @@ class RecursiveAbstractiveProcessing4TreeOrganizedRetrieval:
"",
cnt,
)
cnt = str(cnt or "").strip()
logging.debug(f"SUM: {cnt}")
self._check_task_canceled(task_id, "before embedding")
embds = await self._embedding_encode(cnt)
return cnt.split("\n")[0], cnt, embds
title = cnt.splitlines()[0].strip() if cnt else ""
return title, cnt, embds
except TaskCanceledException:
raise
except Exception as exc: