Skip to content

Commit 09a09a5

Browse files
authored
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".
1 parent af40be6 commit 09a09a5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

agent/component/iterationitem.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def output_collation(self):
6969
if p._id != pid:
7070
continue
7171

72-
if p.component_name.lower() in ["categorize", "message", "switch", "userfillup", "interationitem"]:
72+
if p.component_name.lower() in ["categorize", "message", "switch", "userfillup", "iterationitem"]:
7373
continue
7474

7575
for k, o in p._param.outputs.items():

rag/raptor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ async def _embedding_encode(self, txt):
9191
return response
9292
embds, _ = await thread_pool_exec(self._embd_model.encode, [txt])
9393
if len(embds) < 1 or len(embds[0]) < 1:
94-
raise Exception("Embedding error: ")
94+
raise Exception("Embedding error: empty embeddings returned")
9595
embds = embds[0]
9696
await thread_pool_exec(set_embed_cache, self._embd_model.llm_name, txt, embds)
9797
return embds

0 commit comments

Comments
 (0)