mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
[fix] (llm_analyzer) 修正 aiohttp 的 timeout 参数类型,现已使用 ClientTimeout 实例包裹,确保兼容性和稳定性
This commit is contained in:
@@ -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}")
|
||||
|
||||
Reference in New Issue
Block a user