Browse Source

fix: include_domain does NOT exist

Timothy Jaeryang Baek 2 months ago
parent
commit
ba6cde8a87

+ 1 - 2
backend/open_webui/retrieval/web/tavily.py

@@ -27,8 +27,7 @@ def search_tavily(
     """
     url = "https://api.tavily.com/search"
     data = {"query": query, "api_key": api_key}
-    include_domain = filter_list
-    response = requests.post(url, include_domain, json=data)
+    response = requests.post(url, json=data)
     response.raise_for_status()
 
     json_response = response.json()

+ 1 - 0
backend/open_webui/routers/retrieval.py

@@ -1270,6 +1270,7 @@ def search_web(request: Request, engine: str, query: str) -> list[SearchResult]:
                 request.app.state.config.TAVILY_API_KEY,
                 query,
                 request.app.state.config.RAG_WEB_SEARCH_RESULT_COUNT,
+                request.app.state.config.RAG_WEB_SEARCH_DOMAIN_FILTER_LIST,
             )
         else:
             raise Exception("No TAVILY_API_KEY found in environment variables")