mirror of
https://github.com/open-webui/open-webui
synced 2025-06-23 02:16:52 +00:00
Merge pull request #15138 from zhangtyzzz/exa_search_missing
fix: Resolve exa search not being processed correctly
This commit is contained in:
commit
b08fc297cf
@ -1747,6 +1747,16 @@ def search_web(request: Request, engine: str, query: str) -> list[SearchResult]:
|
|||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
raise Exception("No TAVILY_API_KEY found in environment variables")
|
raise Exception("No TAVILY_API_KEY found in environment variables")
|
||||||
|
elif engine == "exa":
|
||||||
|
if request.app.state.config.EXA_API_KEY:
|
||||||
|
return search_exa(
|
||||||
|
request.app.state.config.EXA_API_KEY,
|
||||||
|
query,
|
||||||
|
request.app.state.config.WEB_SEARCH_RESULT_COUNT,
|
||||||
|
request.app.state.config.WEB_SEARCH_DOMAIN_FILTER_LIST,
|
||||||
|
)
|
||||||
|
else:
|
||||||
|
raise Exception("No EXA_API_KEY found in environment variables")
|
||||||
elif engine == "searchapi":
|
elif engine == "searchapi":
|
||||||
if request.app.state.config.SEARCHAPI_API_KEY:
|
if request.app.state.config.SEARCHAPI_API_KEY:
|
||||||
return search_searchapi(
|
return search_searchapi(
|
||||||
|
Loading…
Reference in New Issue
Block a user