From 03e9add96d58c4cc5253e9981933d5b65c4820b6 Mon Sep 17 00:00:00 2001 From: execgit Date: Tue, 29 Oct 2024 14:33:37 +0200 Subject: [PATCH] retrieval.utils: omit logging file contents at level INFO --- backend/open_webui/apps/retrieval/utils.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/apps/retrieval/utils.py b/backend/open_webui/apps/retrieval/utils.py index 153bd804f..1866d6d2f 100644 --- a/backend/open_webui/apps/retrieval/utils.py +++ b/backend/open_webui/apps/retrieval/utils.py @@ -76,7 +76,7 @@ def query_doc( limit=k, ) - log.info(f"query_doc:result {result}") + log.info(f"query_doc:result {result.ids} {result.metadatas}") return result except Exception as e: print(e) @@ -127,7 +127,10 @@ def query_doc_with_hybrid_search( "metadatas": [[d.metadata for d in result]], } - log.info(f"query_doc_with_hybrid_search:result {result}") + log.info( + "query_doc_with_hybrid_search:result " + + f"{result.metadatas} {result.distances}" + ) return result except Exception as e: raise e