This commit is contained in:
Timothy Jaeryang Baek
2026-04-20 08:36:24 +09:00
parent fd25152076
commit 56c5bc1d34
4 changed files with 8 additions and 5 deletions
+2 -2
View File
@@ -6,7 +6,7 @@ import aiohttp
from pathlib import Path
from typing import Optional
from open_webui.env import AIOHTTP_CLIENT_TIMEOUT
from open_webui.env import AIOHTTP_CLIENT_SESSION_SSL, AIOHTTP_CLIENT_TIMEOUT
from open_webui.models.functions import (
FunctionForm,
FunctionModel,
@@ -117,7 +117,7 @@ async def load_function_from_url(request: Request, form_data: LoadUrlForm, user=
async with aiohttp.ClientSession(
trust_env=True, timeout=aiohttp.ClientTimeout(total=AIOHTTP_CLIENT_TIMEOUT)
) as session:
async with session.get(url, headers={'Content-Type': 'application/json'}) as resp:
async with session.get(url, headers={'Content-Type': 'application/json'}, ssl=AIOHTTP_CLIENT_SESSION_SSL) as resp:
if resp.status != 200:
raise HTTPException(status_code=resp.status, detail='Failed to fetch the function')
data = await resp.text()