community[patch]: Use uuid4 not uuid1 (#20487)

Using UUID1 is incorrect since it's time dependent, which makes it easy
to generate the exact same uuid
This commit is contained in:
Eugene Yurtsev
2024-04-16 09:40:44 -04:00
committed by GitHub
parent f7667c614b
commit c50099161b
11 changed files with 22 additions and 22 deletions

View File

@@ -146,7 +146,7 @@ class Bagel(VectorStore):
"""
# creating unique ids if None
if ids is None:
ids = [str(uuid.uuid1()) for _ in texts]
ids = [str(uuid.uuid4()) for _ in texts]
texts = list(texts)
if self._embedding_function and embeddings is None and texts: