Skip to content

armgit / txtai

Public Imported from GitHub
0

💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows

Modify embeddings batch search return type when index is uninitialized, closes #221

davidmezzettib4a23d6519e7
diff --git a/src/python/txtai/workflow/task/base.py b/src/python/txtai/workflow/task/base.py
index 9ca6aa9a..0648b44d 100644
--- a/src/python/txtai/workflow/task/base.py
+++ b/src/python/txtai/workflow/task/base.py
@@ -124,8 +124,7 @@ class Task:
for x, element in indexed:
if x in ids:
# Get result for process id
- index = ids.index(x)
- result = results[index] if index < len(results) else None
+ result = results[ids.index(x)]
if isinstance(result, OneToMany):
# One to many transformations