This commit is contained in:
youhuanghe
2026-03-16 06:39:29 +00:00
parent 4355f0fa78
commit 254a13bba3
6 changed files with 45 additions and 39 deletions
+7 -5
View File
@@ -244,11 +244,13 @@ class ChromaVectorDatabase(VectorDatabase):
items = []
for i, vid in enumerate(ids):
items.append({
'id': vid,
'document': documents[i] if i < len(documents) else None,
'metadata': metadatas[i] if i < len(metadatas) else {},
})
items.append(
{
'id': vid,
'document': documents[i] if i < len(documents) else None,
'metadata': metadatas[i] if i < len(metadatas) else {},
}
)
# Chroma col.count() gives total in collection; filtered count not available
total = await asyncio.to_thread(col.count) if not filter else -1