From 7292cee8683bc6ca1da65b0b989fad30c2e2f873 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 29 Jun 2026 00:42:39 -0500 Subject: [PATCH] refac --- backend/open_webui/routers/retrieval.py | 2 +- backend/open_webui/tools/builtin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/open_webui/routers/retrieval.py b/backend/open_webui/routers/retrieval.py index 72bad9b02f..41c9de51a8 100644 --- a/backend/open_webui/routers/retrieval.py +++ b/backend/open_webui/routers/retrieval.py @@ -2074,7 +2074,7 @@ async def process_web( ): config = await get_retrieval_config() try: - content, docs = await run_in_threadpool(get_content_from_url, request, form_data.url) + content, docs = await get_content_from_url(request, form_data.url) log.debug(f'text_content: {content}') if process: diff --git a/backend/open_webui/tools/builtin.py b/backend/open_webui/tools/builtin.py index b49f23c021..0ce3c75004 100644 --- a/backend/open_webui/tools/builtin.py +++ b/backend/open_webui/tools/builtin.py @@ -264,7 +264,7 @@ async def fetch_url( return json.dumps({'error': 'Request context not available'}) try: - content, _ = await asyncio.to_thread(get_content_from_url, __request__, url) + content, _ = await get_content_from_url(__request__, url) # Truncate if configured (WEB_FETCH_MAX_CONTENT_LENGTH) # Guard: content may be None if the web loader silently failed