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) 使用此前定义的变量 last_exc
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
sourcery-ai[bot]
parent
94e5777840
commit
8d0b21045d
@@ -72,8 +72,7 @@ class LLMAnalyzer:
|
||||
logger.warning(f"LLM请求超时: 第{attempt}次, timeout={timeout}s")
|
||||
except Exception as e:
|
||||
last_exc = e
|
||||
logger.warning(f"LLM请求失败: 第{attempt}次, 错误: {e}")
|
||||
|
||||
logger.warning(f"LLM请求失败: 第{attempt}次, 错误: {last_exc}")
|
||||
# 若非最后一次,等待退避后重试
|
||||
if attempt < retries:
|
||||
await asyncio.sleep(backoff * attempt)
|
||||
|
||||
Reference in New Issue
Block a user