[fix] (llm_analyzer) 修正 aiohttp 的 timeout 参数类型,现已使用 ClientTimeout 实例包裹,确保兼容性和稳定性

This commit is contained in:
SXP-Simon
2025-09-11 22:26:18 +08:00
parent 687645fc9e
commit 253f7fae7e
+2 -1
View File
@@ -47,7 +47,8 @@ class LLMAnalyzer:
"max_tokens": max_tokens,
"temperature": temperature
}
async with session.post(custom_api_base, json=payload, headers=headers, timeout=timeout) as resp:
aio_timeout = aiohttp.ClientTimeout(total=timeout)
async with session.post(custom_api_base, json=payload, headers=headers, timeout=aio_timeout) as resp:
if resp.status != 200:
error_text = await resp.text()
logger.error(f"自定义LLM服务商请求失败: HTTP {resp.status}, 内容: {error_text}")