extensions/superboogav2: existing embedding check bug fix (#6898)

This commit is contained in:
Ziya 2025-04-24 18:42:05 +03:00 committed by GitHub
parent c71a2af5ab
commit 60ac495d59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -148,7 +148,7 @@ class ChromaCollector():
id_ = new_ids[i]
metadata = metadatas[i] if metadatas is not None else None
embedding = self.embeddings_cache.get(text)
if embedding is not None and embedding.any():
if embedding is not None and any(embedding):
existing_texts.append(text)
existing_embeddings.append(embedding)
existing_ids.append(id_)