From 3979a30787dc255f49bfb641458cfcb05a489f4c Mon Sep 17 00:00:00 2001 From: SXP-Simon Date: Fri, 10 Jul 2026 15:34:13 +0800 Subject: [PATCH] =?UTF-8?q?[v4.10.7]=20-=20=E2=9C=A8=20=E8=A2=AB=E7=A6=81?= =?UTF-8?q?=E8=A8=80=E9=81=BF=E5=85=8D=E8=A7=A6=E5=8F=91=E5=88=86=E6=9E=90?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=B5=AA=E8=B4=B9=20token=EF=BC=8C=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E5=B9=B6=E4=BC=98=E5=8C=96=E6=A8=A1=E5=9E=8B=E8=AF=B7?= =?UTF-8?q?=E6=B1=82=E7=9A=84=E9=87=8D=E8=AF=95=E4=B8=8E=E9=99=8D=E7=BA=A7?= =?UTF-8?q?=E8=A1=A5=E5=81=BF=E6=9C=BA=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitattributes | 15 +++++++++++++++ CHANGELOG.md | 12 ++++++++---- README.md | 2 +- metadata.yaml | 2 +- src/infrastructure/analysis/utils/llm_utils.py | 6 ++++-- .../platform/adapters/onebot_adapter.py | 4 +++- 6 files changed, 32 insertions(+), 9 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1a67759 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,15 @@ +### Demo preview images — not needed at runtime, kept in repo for reference/docs +assets/*.jpg export-ignore +assets/*.png export-ignore + +### CI/CD workflow files — not needed in production plugin zip +.github/ export-ignore + +### Documentation — design docs, not needed at runtime +docs/ export-ignore + +### Scripts — release utilities, not needed by end users +scripts/ export-ignore + +### Test directory — not needed in production +tests/ export-ignore diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fade31..bc1d40f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,15 +1,19 @@ # 更新日志 (CHANGELOG) -## [v4.10.6] - ✨ 支持 [SnowLuma](https://github.com/SnowLuma/SnowLuma) ,优化 HatsuneMiku 移动端适配情况 -* **✨ 支持 SnowLuma**: 自动探测是否为 SnowLuma;支持 SnowLuma 的 get_group_msg_history 参数传递情况 (#189 @tryptophawa)。 -* **🛠️ HatsuneMiku 优化**: 优化了移动端直接使用浏览器打开 HTML 时的 UI 排版情况 (#184 @Shiitin) - +## [v4.10.7] - ✨ 被禁言避免触发分析功能浪费 token,重构并优化模型请求的重试与降级补偿机制 +* **✨ 支持禁言跳过**: 被禁言避免触发分析功能浪费 token (#191) +* **✨ 模型请求优化**: 重构并优化模型请求的重试与降级补偿机制 (@Rat0323) ---
📋 点击查看历史更新日志 +## [v4.10.6] - ✨ 支持 [SnowLuma](https://github.com/SnowLuma/SnowLuma) ,优化 HatsuneMiku 移动端适配情况 +* **✨ 支持 SnowLuma**: 自动探测是否为 SnowLuma;支持 SnowLuma 的 get_group_msg_history 参数传递情况 (#189 @tryptophawa)。 +* **🛠️ HatsuneMiku 优化**: 优化了移动端直接使用浏览器打开 HTML 时的 UI 排版情况 (#184 @Shiitin) + + ## [v4.10.5] - ✨ 支持可选流式 LLM 调用 (#181 @anchorAnc) ## [v4.10.4] - 🛠️ 将镜像地址配置注入到子模板渲染上下文中,解决 ATRI 子模板中变量未定义导致的生成问题 diff --git a/README.md b/README.md index 8e49ad9..d436130 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ # 群聊日常分析插件 -[![Plugin Version](https://img.shields.io/badge/Latest_Version-v4.10.6-blue.svg?style=for-the-badge&color=76bad9)](https://github.com/SXP-Simon/astrbot-qq-group-daily-analysis) +[![Plugin Version](https://img.shields.io/badge/Latest_Version-v4.10.7-blue.svg?style=for-the-badge&color=76bad9)](https://github.com/SXP-Simon/astrbot-qq-group-daily-analysis) [![AstrBot](https://img.shields.io/badge/AstrBot-Plugin-ff69b4?style=for-the-badge)](https://github.com/AstrBotDevs/AstrBot) [![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](LICENSE) [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/SXP-Simon/astrbot_plugin_qq_group_daily_analysis) diff --git a/metadata.yaml b/metadata.yaml index eb7b54c..39b8336 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -1,7 +1,7 @@ name: astrbot_plugin_qq_group_daily_analysis # 这是你的插件的唯一识别名。 display_name: 群分析总结插件 # 插件的显示名称 desc: "[多平台接入开发中] 群日常分析总结插件 - 支持 QQ (aiocqhttp)、Telegram、Discord 以及 Feishu (Lark);生成精美的群聊分析报告,支持话题分析、用户形象、群聊圣经等功能" # 插件简短描述 -version: v4.10.6 # 插件版本号。格式:v1.1.1 或者 v1.1 +version: v4.10.7 # 插件版本号。格式:v1.1.1 或者 v1.1 author: SXP-Simon # 作者 astrbot_version: ">=4.16.0" support_platforms: diff --git a/src/infrastructure/analysis/utils/llm_utils.py b/src/infrastructure/analysis/utils/llm_utils.py index 5480887..5e16d73 100644 --- a/src/infrastructure/analysis/utils/llm_utils.py +++ b/src/infrastructure/analysis/utils/llm_utils.py @@ -376,11 +376,13 @@ async def call_provider_with_retry( fallback_provider_id = await get_provider_id_with_fallback( context, config_manager, None, umo ) - if fallback_provider_id and fallback_provider_id != specific_provider_id: + if ( + fallback_provider_id + and fallback_provider_id != specific_provider_id + ): for _ in range(retries): attempt_queue.append((fallback_provider_id, True)) - is_last_attempt = i == len(attempt_queue) - 1 if not is_last_attempt: # Exponential backoff with jitter: backoff * (2 ^ (attempt_num - 1)) + random jitter diff --git a/src/infrastructure/platform/adapters/onebot_adapter.py b/src/infrastructure/platform/adapters/onebot_adapter.py index 15aba21..7dec09a 100644 --- a/src/infrastructure/platform/adapters/onebot_adapter.py +++ b/src/infrastructure/platform/adapters/onebot_adapter.py @@ -1008,7 +1008,9 @@ class OneBotAdapter(PlatformAdapter): if not e: return False err_str = str(e) - if "1200" in err_str and ("禁言" in err_str or "操作失败" in err_str or "下游群鉴权" in err_str): + if "1200" in err_str and ( + "禁言" in err_str or "操作失败" in err_str or "下游群鉴权" in err_str + ): return True err_msg = getattr(e, "message", "") or "" err_word = getattr(e, "wording", "") or ""