Browse Source

fix: change metadata to metadatas

Peter De-Ath 8 tháng trước cách đây
mục cha
commit
ca9874757f
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      backend/open_webui/apps/rag/vector/dbs/chroma.py

+ 2 - 2
backend/open_webui/apps/rag/vector/dbs/chroma.py

@@ -96,10 +96,10 @@ class ChromaClient:
         ids = [item["id"] for item in items]
         documents = [item["text"] for item in items]
         embeddings = [item["vector"] for item in items]
-        metadata = [item["metadata"] for item in items]
+        metadatas = [item["metadata"] for item in items]
 
         collection.upsert(
-            ids=ids, documents=documents, embeddings=embeddings, metadata=metadata
+            ids=ids, documents=documents, embeddings=embeddings, metadatas=metadatas
         )
 
     def delete(self, collection_name: str, ids: list[str]):