mirror of
https://git.mirrors.martin98.com/https://github.com/open-webui/open-webui
synced 2025-08-17 10:15:54 +08:00
fix: include_domain does NOT exist
This commit is contained in:
parent
9bd26d6faa
commit
ba6cde8a87
@ -27,8 +27,7 @@ def search_tavily(
|
|||||||
"""
|
"""
|
||||||
url = "https://api.tavily.com/search"
|
url = "https://api.tavily.com/search"
|
||||||
data = {"query": query, "api_key": api_key}
|
data = {"query": query, "api_key": api_key}
|
||||||
include_domain = filter_list
|
response = requests.post(url, json=data)
|
||||||
response = requests.post(url, include_domain, json=data)
|
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
|
|
||||||
json_response = response.json()
|
json_response = response.json()
|
||||||
|
@ -1270,6 +1270,7 @@ def search_web(request: Request, engine: str, query: str) -> list[SearchResult]:
|
|||||||
request.app.state.config.TAVILY_API_KEY,
|
request.app.state.config.TAVILY_API_KEY,
|
||||||
query,
|
query,
|
||||||
request.app.state.config.RAG_WEB_SEARCH_RESULT_COUNT,
|
request.app.state.config.RAG_WEB_SEARCH_RESULT_COUNT,
|
||||||
|
request.app.state.config.RAG_WEB_SEARCH_DOMAIN_FILTER_LIST,
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
raise Exception("No TAVILY_API_KEY found in environment variables")
|
raise Exception("No TAVILY_API_KEY found in environment variables")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user