Next test of timeout

This commit is contained in:
Saifeddine ALOUI
2025-01-10 22:17:13 +01:00
parent ab3cc3f0f4
commit a619b01064
2 changed files with 9 additions and 5 deletions

View File

@@ -407,11 +407,10 @@ async def lollms_model_if_cache(
full_prompt += prompt
request_data["prompt"] = full_prompt
timeout = aiohttp.ClientTimeout(total=kwargs.get("timeout", 300)) # 300 seconds = 5 minutes
timeout = aiohttp.ClientTimeout(total=kwargs.get("timeout", None))
async with aiohttp.ClientSession(timeout=timeout) as session:
if stream:
async def inner():
async with session.post(
f"{base_url}/lollms_generate", json=request_data