From 32257089f96db4c4a7e782511c63fae0f5729292 Mon Sep 17 00:00:00 2001 From: Bryan Berns Date: Thu, 1 May 2025 03:56:20 -0400 Subject: [PATCH] Use SHA256 For Query Result Computation --- backend/open_webui/retrieval/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/retrieval/utils.py b/backend/open_webui/retrieval/utils.py index 410945c81..b952080d3 100644 --- a/backend/open_webui/retrieval/utils.py +++ b/backend/open_webui/retrieval/utils.py @@ -207,7 +207,7 @@ def merge_and_sort_query_results(query_results: list[dict], k: int) -> dict: for distance, document, metadata in zip(distances, documents, metadatas): if isinstance(document, str): - doc_hash = hashlib.md5( + doc_hash = hashlib.sha256( document.encode() ).hexdigest() # Compute a hash for uniqueness