fix: correct typo in IterationItem name check and incomplete error message (#13890)

Two small fixes:

1. **iterationitem.py line 72**: Typo "interationitem" → "iterationitem"
(missing 't'). The component name check never matched IterationItem
components.

2. **raptor.py line 94**: Error message "Embedding error: " had a
trailing colon with no details. Changed to "Embedding error: empty
embeddings returned".
This commit is contained in:
Ricardo-M-L
2026-04-02 10:35:28 +08:00
committed by GitHub
parent af40be68c3
commit 09a09a5b20
2 changed files with 2 additions and 2 deletions

View File

@@ -69,7 +69,7 @@ class IterationItem(ComponentBase, ABC):
if p._id != pid:
continue
if p.component_name.lower() in ["categorize", "message", "switch", "userfillup", "interationitem"]:
if p.component_name.lower() in ["categorize", "message", "switch", "userfillup", "iterationitem"]:
continue
for k, o in p._param.outputs.items():

View File

@@ -91,7 +91,7 @@ class RecursiveAbstractiveProcessing4TreeOrganizedRetrieval:
return response
embds, _ = await thread_pool_exec(self._embd_model.encode, [txt])
if len(embds) < 1 or len(embds[0]) < 1:
raise Exception("Embedding error: ")
raise Exception("Embedding error: empty embeddings returned")
embds = embds[0]
await thread_pool_exec(set_embed_cache, self._embd_model.llm_name, txt, embds)
return embds