Skip to content

Commit 67a706c

Browse files
authored
Should be using uuid4 not uuid1 (#27)
Use uuid4
1 parent c587e4c commit 67a706c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

langchain_postgres/vectorstores.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ def __from(
430430
**kwargs: Any,
431431
) -> PGVector:
432432
if ids is None:
433-
ids = [str(uuid.uuid1()) for _ in texts]
433+
ids = [str(uuid.uuid4()) for _ in texts]
434434

435435
if not metadatas:
436436
metadatas = [{} for _ in texts]
@@ -468,7 +468,7 @@ def add_embeddings(
468468
kwargs: vectorstore specific parameters
469469
"""
470470
if ids is None:
471-
ids = [str(uuid.uuid1()) for _ in texts]
471+
ids = [str(uuid.uuid4()) for _ in texts]
472472

473473
if not metadatas:
474474
metadatas = [{} for _ in texts]

0 commit comments

Comments
 (0)