Repository navigation
feat: 支持按消息条数批量判断群聊回复 - #30
Open
mocha114514 wants to merge 2 commits into
Open
mocha114514 wants to merge 2 commits into
mocha114514 wants to merge 2 commits into
Conversation
Accumulate eligible messages per chat before one combined LLM or JEV judgment. Keep the default interval at one for existing behavior. Preserve complete batch text and image ownership independently of history limits, including JEV image deduplication and caps. Clear batches after judgment, failure, cancellation, reset, or eviction. Document the setting and add focused batching and image-mapping tests. Validation: 56 unit tests passed, plus Ruff and configuration JSON checks.
Remove the expanded batching section and related prose changes. Keep only the new judgment interval entry and the clarification of additional history in the configuration table.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
目前每条符合条件的群聊消息都会触发一次判断。群聊消息较多时,判断模型的调用频率较高。
本次新增可选的批量判断机制:累计一定数量的新消息后,结合整批内容统一判断是否适合参与群聊,而不是只判断最后一条消息。
主要改动
judge_message_interval配置,范围 1–100,默认 1,保持原有逐条判断行为。/heartflow增加待判断消息的累计进度,并补充配置说明及测试。例如:
{ "judge_message_interval": 10, "judge_context_count": 5 }表示每累计 10 条符合条件的新消息,携带这整批消息和最多 5 条额外历史,统一判断一次。
行为与兼容性
验证
git diff --check通过。