From f243e523a6f6f9007a8b380b5323cac53db51170 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sun, 6 Apr 2025 15:52:38 -0700 Subject: [PATCH] refac --- backend/open_webui/routers/retrieval.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/open_webui/routers/retrieval.py b/backend/open_webui/routers/retrieval.py index 045366900..9b52a04b7 100644 --- a/backend/open_webui/routers/retrieval.py +++ b/backend/open_webui/routers/retrieval.py @@ -1493,11 +1493,11 @@ async def process_web_search( else: collection_names = [] for doc_idx, doc in enumerate(docs): - collection_name = f"web-search-{calculate_sha256_string( - f"{form_data.query}-{urls[doc_idx]}" - )}"[:63] - collection_names.append(collection_name) + collection_name = f"web-search-{calculate_sha256_string(form_data.query + '-' + urls[doc_idx])}"[ + :63 + ] + collection_names.append(collection_name) await run_in_threadpool( save_docs_to_vector_db,