From 09a09a5b2061519896b0e855a3446dcfa5664f23 Mon Sep 17 00:00:00 2001 From: Ricardo-M-L <69202550+Ricardo-M-L@users.noreply.github.com> Date: Thu, 2 Apr 2026 10:35:28 +0800 Subject: [PATCH] fix: correct typo in IterationItem name check and incomplete error message (#13890) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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". --- agent/component/iterationitem.py | 2 +- rag/raptor.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/component/iterationitem.py b/agent/component/iterationitem.py index 83713aedb7..fad4a44e98 100644 --- a/agent/component/iterationitem.py +++ b/agent/component/iterationitem.py @@ -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(): diff --git a/rag/raptor.py b/rag/raptor.py index 72e9412968..5d952dc428 100644 --- a/rag/raptor.py +++ b/rag/raptor.py @@ -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