From 9440d09114797df5db6166d3ab630fa6fb699404 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Sat, 28 Feb 2026 13:07:10 -0600 Subject: [PATCH] refac --- backend/open_webui/config.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/backend/open_webui/config.py b/backend/open_webui/config.py index a688fa652..f14c26e06 100644 --- a/backend/open_webui/config.py +++ b/backend/open_webui/config.py @@ -3211,17 +3211,24 @@ WEB_SEARCH_RESULT_COUNT = PersistentConfig( ) +try: + web_search_domain_filter_list = json.loads( + os.getenv("WEB_SEARCH_DOMAIN_FILTER_LIST", "[]") + ) +except Exception as e: + web_search_domain_filter_list = [ + # "wikipedia.com", + # "wikimedia.org", + # "wikidata.org", + # "!stackoverflow.com", + ] + # You can provide a list of your own websites to filter after performing a web search. # This ensures the highest level of safety and reliability of the information sources. WEB_SEARCH_DOMAIN_FILTER_LIST = PersistentConfig( "WEB_SEARCH_DOMAIN_FILTER_LIST", "rag.web.search.domain.filter_list", - [ - # "wikipedia.com", - # "wikimedia.org", - # "wikidata.org", - # "!stackoverflow.com", - ], + web_search_domain_filter_list, ) WEB_SEARCH_CONCURRENT_REQUESTS = PersistentConfig(