From e2a6356bab9201834a1c82659427a324d161aef2 Mon Sep 17 00:00:00 2001 From: liuwei Date: Mon, 27 Apr 2026 14:46:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=A9=E5=A4=A7=E6=88=90=E5=91=98=E9=94=90?= =?UTF-8?q?=E8=AF=84=E7=9A=84=E6=9C=80=E8=BF=91=E5=8F=91=E8=A8=80=E6=A0=B7?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 将成员锐评插件的最近发言默认采样窗口从50条提升到200条。 2. 补充中文注释,说明更大样本有助于识别口头禅、重复行为和阶段性状态。 --- plugins/member_roast/config.toml | 7 +++++-- plugins/member_roast/main.py | 6 +++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/member_roast/config.toml b/plugins/member_roast/config.toml index fca515c..fea7230 100644 --- a/plugins/member_roast/config.toml +++ b/plugins/member_roast/config.toml @@ -21,9 +21,12 @@ max_retries = 2 retry_delay_seconds = 1.5 [profile] -# 最近消息窗口:尽量贴近用户提出的“最近 50 条发言”。 +# 最近消息窗口: +# 1. 初版按 50 条实现,但用户希望拉高到 200 条,便于模型更稳定识别人设和口头禅; +# 2. 这里直接把默认值提到 200,优先让“锐评像群里老油条写的”; +# 3. 真要收缩样本时,只需要改这里,不用动代码。 sample_days = 30 -message_limit = 50 +message_limit = 200 min_message_count = 8 context_stale_hours = 24 name_match_min_chars = 2 diff --git a/plugins/member_roast/main.py b/plugins/member_roast/main.py index b194b14..d977bca 100644 --- a/plugins/member_roast/main.py +++ b/plugins/member_roast/main.py @@ -52,7 +52,11 @@ class MemberRoastService: profile_cfg = self.plugin_config.get("profile", {}) or {} self.sample_days = max(int(profile_cfg.get("sample_days", 30) or 30), 1) - self.message_limit = max(int(profile_cfg.get("message_limit", 50) or 50), 1) + # 最近发言样本默认提升到 200 条: + # 1. 锐评比普通摘要更依赖口头禅、重复行为和阶段性状态; + # 2. 样本过少时,模型容易只抓住最近几句偶发发言,导致人设偏差; + # 3. 因此这里放宽窗口,让模型更容易看出“长期稳定抽象点”。 + self.message_limit = max(int(profile_cfg.get("message_limit", 200) or 200), 1) self.min_message_count = max(int(profile_cfg.get("min_message_count", 8) or 8), 1) self.context_stale_hours = max(int(profile_cfg.get("context_stale_hours", 24) or 24), 1) self.history_profile_days = max(int(profile_cfg.get("history_profile_days", 60) or 60), 1)