mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-10 20:40:18 +02:00
refac
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user