mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-09 03:18:18 +00:00
fix: apply AIOHTTP_CLIENT_TIMEOUT to embeddings endpoint (#21558)
This commit is contained in:
parent
af5661c2c8
commit
56246324b2
1 changed files with 8 additions and 2 deletions
|
|
@ -1194,7 +1194,10 @@ async def embeddings(request: Request, form_data: dict, user):
|
|||
request, url, key, api_config, user=user
|
||||
)
|
||||
try:
|
||||
session = aiohttp.ClientSession(trust_env=True)
|
||||
session = aiohttp.ClientSession(
|
||||
trust_env=True,
|
||||
timeout=aiohttp.ClientTimeout(total=AIOHTTP_CLIENT_TIMEOUT),
|
||||
)
|
||||
r = await session.request(
|
||||
method="POST",
|
||||
url=f"{url}/embeddings",
|
||||
|
|
@ -1421,7 +1424,10 @@ async def proxy(path: str, request: Request, user=Depends(get_verified_user)):
|
|||
else:
|
||||
request_url = f"{url}/{path}"
|
||||
|
||||
session = aiohttp.ClientSession(trust_env=True)
|
||||
session = aiohttp.ClientSession(
|
||||
trust_env=True,
|
||||
timeout=aiohttp.ClientTimeout(total=AIOHTTP_CLIENT_TIMEOUT),
|
||||
)
|
||||
r = await session.request(
|
||||
method=request.method,
|
||||
url=request_url,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue