mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
[v4.10.7] - ✨ 被禁言避免触发分析功能浪费 token,重构并优化模型请求的重试与降级补偿机制
This commit is contained in:
@@ -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
|
||||||
+8
-4
@@ -1,15 +1,19 @@
|
|||||||
# 更新日志 (CHANGELOG)
|
# 更新日志 (CHANGELOG)
|
||||||
|
|
||||||
## [v4.10.6] - ✨ 支持 [SnowLuma](https://github.com/SnowLuma/SnowLuma) ,优化 HatsuneMiku 移动端适配情况
|
## [v4.10.7] - ✨ 被禁言避免触发分析功能浪费 token,重构并优化模型请求的重试与降级补偿机制
|
||||||
* **✨ 支持 SnowLuma**: 自动探测是否为 SnowLuma;支持 SnowLuma 的 get_group_msg_history 参数传递情况 (#189 @tryptophawa)。
|
* **✨ 支持禁言跳过**: 被禁言避免触发分析功能浪费 token (#191)
|
||||||
* **🛠️ HatsuneMiku 优化**: 优化了移动端直接使用浏览器打开 HTML 时的 UI 排版情况 (#184 @Shiitin)
|
* **✨ 模型请求优化**: 重构并优化模型请求的重试与降级补偿机制 (@Rat0323)
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>📋 点击查看历史更新日志</summary>
|
<summary>📋 点击查看历史更新日志</summary>
|
||||||
|
|
||||||
|
## [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.5] - ✨ 支持可选流式 LLM 调用 (#181 @anchorAnc)
|
||||||
|
|
||||||
## [v4.10.4] - 🛠️ 将镜像地址配置注入到子模板渲染上下文中,解决 ATRI 子模板中变量未定义导致的生成问题
|
## [v4.10.4] - 🛠️ 将镜像地址配置注入到子模板渲染上下文中,解决 ATRI 子模板中变量未定义导致的生成问题
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# 群聊日常分析插件
|
# 群聊日常分析插件
|
||||||
|
|
||||||
[](https://github.com/SXP-Simon/astrbot-qq-group-daily-analysis)
|
[](https://github.com/SXP-Simon/astrbot-qq-group-daily-analysis)
|
||||||
[](https://github.com/AstrBotDevs/AstrBot)
|
[](https://github.com/AstrBotDevs/AstrBot)
|
||||||
[](LICENSE)
|
[](LICENSE)
|
||||||
[](https://deepwiki.com/SXP-Simon/astrbot_plugin_qq_group_daily_analysis)
|
[](https://deepwiki.com/SXP-Simon/astrbot_plugin_qq_group_daily_analysis)
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
name: astrbot_plugin_qq_group_daily_analysis # 这是你的插件的唯一识别名。
|
name: astrbot_plugin_qq_group_daily_analysis # 这是你的插件的唯一识别名。
|
||||||
display_name: 群分析总结插件 # 插件的显示名称
|
display_name: 群分析总结插件 # 插件的显示名称
|
||||||
desc: "[多平台接入开发中] 群日常分析总结插件 - 支持 QQ (aiocqhttp)、Telegram、Discord 以及 Feishu (Lark);生成精美的群聊分析报告,支持话题分析、用户形象、群聊圣经等功能" # 插件简短描述
|
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 # 作者
|
author: SXP-Simon # 作者
|
||||||
astrbot_version: ">=4.16.0"
|
astrbot_version: ">=4.16.0"
|
||||||
support_platforms:
|
support_platforms:
|
||||||
|
|||||||
@@ -376,11 +376,13 @@ async def call_provider_with_retry(
|
|||||||
fallback_provider_id = await get_provider_id_with_fallback(
|
fallback_provider_id = await get_provider_id_with_fallback(
|
||||||
context, config_manager, None, umo
|
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):
|
for _ in range(retries):
|
||||||
attempt_queue.append((fallback_provider_id, True))
|
attempt_queue.append((fallback_provider_id, True))
|
||||||
|
|
||||||
|
|
||||||
is_last_attempt = i == len(attempt_queue) - 1
|
is_last_attempt = i == len(attempt_queue) - 1
|
||||||
if not is_last_attempt:
|
if not is_last_attempt:
|
||||||
# Exponential backoff with jitter: backoff * (2 ^ (attempt_num - 1)) + random jitter
|
# Exponential backoff with jitter: backoff * (2 ^ (attempt_num - 1)) + random jitter
|
||||||
|
|||||||
@@ -1008,7 +1008,9 @@ class OneBotAdapter(PlatformAdapter):
|
|||||||
if not e:
|
if not e:
|
||||||
return False
|
return False
|
||||||
err_str = str(e)
|
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
|
return True
|
||||||
err_msg = getattr(e, "message", "") or ""
|
err_msg = getattr(e, "message", "") or ""
|
||||||
err_word = getattr(e, "wording", "") or ""
|
err_word = getattr(e, "wording", "") or ""
|
||||||
|
|||||||
Reference in New Issue
Block a user