mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-05 08:10:30 +00:00
enh: Make builtin search web tools asynchronous (#20630)
Co-authored-by: Tim Baek <tim@openwebui.com> Co-authored-by: joaoback <156559121+joaoback@users.noreply.github.com>
This commit is contained in:
parent
e26f6acc3b
commit
1d343aeae4
1 changed files with 1 additions and 1 deletions
|
|
@ -166,7 +166,7 @@ async def search_web(
|
|||
engine = __request__.app.state.config.WEB_SEARCH_ENGINE
|
||||
user = UserModel(**__user__) if __user__ else None
|
||||
|
||||
results = _search_web(__request__, engine, query, user)
|
||||
results = await asyncio.to_thread(_search_web, __request__, engine, query, user)
|
||||
|
||||
# Limit results
|
||||
results = results[:count] if results else []
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue