Browse Source

Merge pull request #2040 from akx/uuid4

fix: do not use hardware ID in document ID generation
Timothy Jaeryang Baek 1 năm trước cách đây
mục cha
commit
876853f2b0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      backend/apps/rag/main.py

+ 1 - 1
backend/apps/rag/main.py

@@ -622,7 +622,7 @@ def store_docs_in_vector_db(docs, collection_name, overwrite: bool = False) -> b
 
         for batch in create_batches(
             api=CHROMA_CLIENT,
-            ids=[str(uuid.uuid1()) for _ in texts],
+            ids=[str(uuid.uuid4()) for _ in texts],
             metadatas=metadatas,
             embeddings=embeddings,
             documents=texts,