feat(affinity-flow): 重构亲和流配置系统

将硬编码的兴趣度评分参数迁移到集中式配置管理,新增AffinityFlowConfig配置类
- 从全局配置加载评分权重、阈值和计算参数
- 统一管理匹配奖励、关系分数和提及bot相关配置
- 更新配置文件模板包含完整的亲和流参数
- 确保各模块使用一致的配置值而非硬编码常量
This commit is contained in:
Windpicker-owo
2025-09-19 13:16:45 +08:00
parent 812e4d76f8
commit 96e4dc2946
7 changed files with 109 additions and 41 deletions

View File

@@ -1,5 +1,5 @@
[inner]
version = "6.8.6"
version = "6.9.6"
#----以下是给开发人员阅读的如果你只是部署了MoFox-Bot不需要阅读----
#如果你想要修改配置文件请递增version的值
@@ -520,4 +520,32 @@ name = "Maizone默认互通组"
chat_ids = [
["group", "111111"], # 示例群聊1
["private", "222222"] # 示例私聊2
]
]
[affinity_flow]
# 兴趣评分系统参数
reply_action_interest_threshold = 0.62 # 回复动作兴趣阈值
non_reply_action_interest_threshold = 0.48 # 非回复动作兴趣阈值
high_match_interest_threshold = 0.65 # 高匹配兴趣阈值
medium_match_interest_threshold = 0.5 # 中匹配兴趣阈值
low_match_interest_threshold = 0.2 # 低匹配兴趣阈值
high_match_keyword_multiplier = 1.8 # 高匹配关键词兴趣倍率
medium_match_keyword_multiplier = 1.4 # 中匹配关键词兴趣倍率
low_match_keyword_multiplier = 1.15 # 低匹配关键词兴趣倍率
match_count_bonus = 0.05 # 匹配数关键词加成值
max_match_bonus = 0.3 # 最大匹配数加成值
# 回复决策系统参数
no_reply_threshold_adjustment = 0.1 # 不回复兴趣阈值调整值
reply_cooldown_reduction = 2 # 回复后减少的不回复计数
max_no_reply_count = 5 # 最大不回复计数次数
# 综合评分权重
keyword_match_weight = 0.4 # 兴趣关键词匹配度权重
mention_bot_weight = 0.3 # 提及bot分数权重
relationship_weight = 0.3 # 人物关系分数权重
# 提及bot相关参数
mention_bot_adjustment_threshold = 0.3 # 提及bot后的调整阈值
mention_bot_interest_score = 0.6 # 提及bot的兴趣分
base_relationship_score = 0.3 # 基础人物关系分