调整配置文件,优化消息缓存、打断系统及主动思考功能的参数设置
This commit is contained in:
@@ -108,7 +108,7 @@ compress_identity = true # 是否压缩身份,压缩后会精简身份信息
|
|||||||
mode = "classic"
|
mode = "classic"
|
||||||
|
|
||||||
# expiration_days: 表达方式过期天数,超过此天数未激活的表达方式将被清理
|
# expiration_days: 表达方式过期天数,超过此天数未激活的表达方式将被清理
|
||||||
expiration_days = 3
|
expiration_days = 1
|
||||||
|
|
||||||
# rules是一个列表,每个元素都是一个学习规则
|
# rules是一个列表,每个元素都是一个学习规则
|
||||||
# chat_stream_id: 聊天流ID,格式为 "platform:id:type",例如 "qq:123456:private"。空字符串""表示全局配置
|
# chat_stream_id: 聊天流ID,格式为 "platform:id:type",例如 "qq:123456:private"。空字符串""表示全局配置
|
||||||
@@ -143,10 +143,10 @@ max_context_size = 25 # 上下文长度
|
|||||||
thinking_timeout = 40 # MoFox-Bot一次回复最长思考规划时间,超过这个时间的思考会放弃(往往是api反应太慢)
|
thinking_timeout = 40 # MoFox-Bot一次回复最长思考规划时间,超过这个时间的思考会放弃(往往是api反应太慢)
|
||||||
|
|
||||||
# 消息缓存系统配置
|
# 消息缓存系统配置
|
||||||
enable_message_cache = true # 是否启用消息缓存系统(启用后,处理中收到的消息会被缓存,处理完成后统一刷新到未读列表)
|
enable_message_cache = false # 是否启用消息缓存系统(启用后,处理中收到的消息会被缓存,处理完成后统一刷新到未读列表)
|
||||||
|
|
||||||
# 消息打断系统配置 - 反比例函数概率模型
|
# 消息打断系统配置 - 反比例函数概率模型
|
||||||
interruption_enabled = true # 是否启用消息打断系统
|
interruption_enabled = false # 是否启用消息打断系统
|
||||||
allow_reply_interruption = false # 是否允许在正在生成回复时打断(true=允许打断回复,false=回复期间不允许打断)
|
allow_reply_interruption = false # 是否允许在正在生成回复时打断(true=允许打断回复,false=回复期间不允许打断)
|
||||||
interruption_max_limit = 5 # 每个聊天流的最大打断次数
|
interruption_max_limit = 5 # 每个聊天流的最大打断次数
|
||||||
interruption_min_probability = 0.05 # 最低打断概率(反比例函数趋近的下限值)
|
interruption_min_probability = 0.05 # 最低打断概率(反比例函数趋近的下限值)
|
||||||
@@ -187,9 +187,9 @@ mute_group_list = []
|
|||||||
enable_notice_trigger_chat = false # 是否允许notice消息触发聊天流程(默认关闭,notice只会被记录但不会触发回复)
|
enable_notice_trigger_chat = false # 是否允许notice消息触发聊天流程(默认关闭,notice只会被记录但不会触发回复)
|
||||||
notice_in_prompt = true # 是否在提示词中展示最近的notice消息
|
notice_in_prompt = true # 是否在提示词中展示最近的notice消息
|
||||||
notice_prompt_limit = 5 # 在提示词中展示的最大notice数量
|
notice_prompt_limit = 5 # 在提示词中展示的最大notice数量
|
||||||
notice_time_window = 3600 # notice时间窗口(秒),只有这个时间范围内的notice会在提示词中展示,默认1小时
|
notice_time_window = 1800 # notice时间窗口(秒),只有这个时间范围内的notice会在提示词中展示,默认0.5小时
|
||||||
max_notices_per_chat = 30 # 每个聊天保留的notice数量上限
|
max_notices_per_chat = 30 # 每个聊天保留的notice数量上限
|
||||||
notice_retention_time = 86400 # notice保留时间(秒),默认24小时
|
notice_retention_time = 3600 # notice保留时间(秒),默认1小时
|
||||||
|
|
||||||
[tool]
|
[tool]
|
||||||
enable_tool = true # 是否在普通聊天中启用工具
|
enable_tool = true # 是否在普通聊天中启用工具
|
||||||
@@ -243,7 +243,7 @@ enable_query_optimization = true # 启用查询优化(使用小模型分析对
|
|||||||
# 建议:1) 降低执行频率;2) 提高相似度阈值减少误判;3) 限制批量大小
|
# 建议:1) 降低执行频率;2) 提高相似度阈值减少误判;3) 限制批量大小
|
||||||
consolidation_enabled = true # 是否启用记忆整合
|
consolidation_enabled = true # 是否启用记忆整合
|
||||||
consolidation_interval_hours = 1.0 # 整合任务执行间隔
|
consolidation_interval_hours = 1.0 # 整合任务执行间隔
|
||||||
consolidation_deduplication_threshold = 0.93 # 相似记忆去重阈值
|
consolidation_deduplication_threshold = 0.9 # 相似记忆去重阈值
|
||||||
consolidation_time_window_hours = 2.0 # 整合时间窗口(小时)- 统一用于去重和关联
|
consolidation_time_window_hours = 2.0 # 整合时间窗口(小时)- 统一用于去重和关联
|
||||||
consolidation_max_batch_size = 100 # 单次最多处理的记忆数量
|
consolidation_max_batch_size = 100 # 单次最多处理的记忆数量
|
||||||
|
|
||||||
@@ -353,7 +353,7 @@ planner_custom_prompt_content = "" # 决策器自定义提示词内容,如果
|
|||||||
|
|
||||||
# 注意力优化配置 - 防止提示词过度相似导致LLM注意力退化
|
# 注意力优化配置 - 防止提示词过度相似导致LLM注意力退化
|
||||||
[attention_optimization]
|
[attention_optimization]
|
||||||
enable_noise = true # 启用轻量级噪声注入(空白字符调整)
|
enable_noise = false # 启用轻量级噪声注入(空白字符调整)
|
||||||
enable_semantic_variants = false # 启用语义变体替换(实验性功能)
|
enable_semantic_variants = false # 启用语义变体替换(实验性功能)
|
||||||
noise_strength = "light" # 噪声强度: "light"(轻量) | "medium"(中等) | "heavy"(强力),推荐使用light
|
noise_strength = "light" # 噪声强度: "light"(轻量) | "medium"(中等) | "heavy"(强力),推荐使用light
|
||||||
|
|
||||||
@@ -362,9 +362,9 @@ enable_response_post_process = true # 是否启用回复后处理,包括错别
|
|||||||
|
|
||||||
[chinese_typo]
|
[chinese_typo]
|
||||||
enable = true # 是否启用中文错别字生成器
|
enable = true # 是否启用中文错别字生成器
|
||||||
error_rate=0.01 # 单字替换概率
|
error_rate=0.001 # 单字替换概率
|
||||||
min_freq=9 # 最小字频阈值
|
min_freq=9 # 最小字频阈值
|
||||||
tone_error_rate=0.1 # 声调错误概率
|
tone_error_rate=0.005 # 声调错误概率
|
||||||
word_replace_rate=0.006 # 整词替换概率
|
word_replace_rate=0.006 # 整词替换概率
|
||||||
|
|
||||||
[response_splitter]
|
[response_splitter]
|
||||||
@@ -520,50 +520,50 @@ chat_ids = [
|
|||||||
[affinity_flow]
|
[affinity_flow]
|
||||||
enable_normal_mode = true # 是否启用 Normal 聊天模式。启用后,在专注模式回复后会自动切换,并根据兴趣度决定是否回复,以实现更快速的回复。
|
enable_normal_mode = true # 是否启用 Normal 聊天模式。启用后,在专注模式回复后会自动切换,并根据兴趣度决定是否回复,以实现更快速的回复。
|
||||||
# 兴趣评分系统参数
|
# 兴趣评分系统参数
|
||||||
reply_action_interest_threshold = 0.9 # 回复动作兴趣阈值
|
reply_action_interest_threshold = 0.75 # 回复动作兴趣阈值
|
||||||
non_reply_action_interest_threshold = 0.8 # 非回复动作兴趣阈值
|
non_reply_action_interest_threshold = 0.65 # 非回复动作兴趣阈值
|
||||||
high_match_interest_threshold = 0.7 # 高匹配兴趣阈值
|
high_match_interest_threshold = 0.6 # 高匹配兴趣阈值
|
||||||
medium_match_interest_threshold = 0.4 # 中匹配兴趣阈值
|
medium_match_interest_threshold = 0.4 # 中匹配兴趣阈值
|
||||||
low_match_interest_threshold = 0.2 # 低匹配兴趣阈值
|
low_match_interest_threshold = 0.2 # 低匹配兴趣阈值
|
||||||
high_match_keyword_multiplier = 5 # 高匹配关键词兴趣倍率
|
high_match_keyword_multiplier = 4 # 高匹配关键词兴趣倍率
|
||||||
medium_match_keyword_multiplier = 3.75 # 中匹配关键词兴趣倍率
|
medium_match_keyword_multiplier = 2.5 # 中匹配关键词兴趣倍率
|
||||||
low_match_keyword_multiplier = 1.3 # 低匹配关键词兴趣倍率
|
low_match_keyword_multiplier = 1.15 # 低匹配关键词兴趣倍率
|
||||||
match_count_bonus = 0.02 # 匹配数关键词加成值
|
match_count_bonus = 0.01 # 匹配数关键词加成值
|
||||||
max_match_bonus = 0.25 # 最大匹配数加成值
|
max_match_bonus = 0.1 # 最大匹配数加成值
|
||||||
|
|
||||||
# 回复决策系统参数
|
# 回复决策系统参数
|
||||||
no_reply_threshold_adjustment = 0.01 # 不回复兴趣阈值调整值
|
no_reply_threshold_adjustment = 0.02 # 不回复兴趣阈值调整值
|
||||||
reply_cooldown_reduction = 5 # 回复后减少的不回复计数
|
reply_cooldown_reduction = 2 # 回复后减少的不回复计数
|
||||||
max_no_reply_count = 20 # 最大不回复计数次数
|
max_no_reply_count = 5 # 最大不回复计数次数
|
||||||
|
|
||||||
# 回复后连续对话机制参数
|
# 回复后连续对话机制参数
|
||||||
enable_post_reply_boost = true # 是否启用回复后阈值降低机制,使bot在回复后更容易进行连续对话
|
enable_post_reply_boost = true # 是否启用回复后阈值降低机制,使bot在回复后更容易进行连续对话
|
||||||
post_reply_threshold_reduction = 0.15 # 回复后初始阈值降低值(建议0.1-0.2)
|
post_reply_threshold_reduction = 0.1 # 回复后初始阈值降低值
|
||||||
post_reply_boost_max_count = 3 # 回复后阈值降低的最大持续次数(建议2-5)
|
post_reply_boost_max_count = 3 # 回复后阈值降低的最大持续次数
|
||||||
post_reply_boost_decay_rate = 0.5 # 每次回复后阈值降低衰减率(0-1,建议0.3-0.7)
|
post_reply_boost_decay_rate = 0.5 # 每次回复后阈值降低衰减率(0-1,越小衰减越快)
|
||||||
|
|
||||||
# 综合评分权重
|
# 综合评分权重
|
||||||
keyword_match_weight = 0.4 # 兴趣关键词匹配度权重
|
keyword_match_weight = 0.5 # 兴趣关键词匹配度权重
|
||||||
mention_bot_weight = 0.3 # 提及bot分数权重
|
mention_bot_weight = 0.3 # 提及bot分数权重
|
||||||
relationship_weight = 0.3 # 人物关系分数权重
|
relationship_weight = 0.2 # 人物关系分数权重
|
||||||
|
|
||||||
# 提及bot相关参数
|
# 提及bot相关参数
|
||||||
mention_bot_adjustment_threshold = 0.5 # 提及bot后的调整阈值
|
mention_bot_adjustment_threshold = 0.5 # 提及bot后的调整阈值
|
||||||
# 强提及(被@、被回复、私聊)和弱提及(文本匹配名字/别名)使用不同分值
|
# 强提及(被@、被回复、私聊)和弱提及(文本匹配名字/别名)使用不同分值
|
||||||
strong_mention_interest_score = 2.5 # 强提及的兴趣分(被@、被回复、私聊)
|
strong_mention_interest_score = 2.0 # 强提及的兴趣分(被@、被回复、私聊)
|
||||||
weak_mention_interest_score = 1.5 # 弱提及的兴趣分(文本匹配bot名字或别名)
|
weak_mention_interest_score = 0.8 # 弱提及的兴趣分(文本匹配bot名字或别名)
|
||||||
base_relationship_score = 0.3 # 基础人物关系分
|
base_relationship_score = 0.3 # 基础人物关系分
|
||||||
|
|
||||||
[proactive_thinking] # 主动思考(主动发起对话)功能配置
|
[proactive_thinking] # 主动思考(主动发起对话)功能配置
|
||||||
# 详细配置说明请参考:docs/proactive_thinking_config_guide.md
|
# 详细配置说明请参考:docs/proactive_thinking_config_guide.md
|
||||||
|
|
||||||
# --- 总开关 ---
|
# --- 总开关 ---
|
||||||
enable = false # 是否启用主动发起对话功能
|
enable = true # 是否启用主动发起对话功能
|
||||||
|
|
||||||
# --- 间隔配置 ---
|
# --- 间隔配置 ---
|
||||||
base_interval = 1800 # 基础触发间隔(秒),默认30分钟
|
base_interval = 720 # 基础触发间隔(秒),默认12分钟
|
||||||
min_interval = 600 # 最小触发间隔(秒),默认10分钟
|
min_interval = 360 # 最小触发间隔(秒),默认6分钟
|
||||||
max_interval = 7200 # 最大触发间隔(秒),默认2小时
|
max_interval = 2880 # 最大触发间隔(秒),默认48分钟
|
||||||
|
|
||||||
# 动态调整配置
|
# 动态调整配置
|
||||||
use_interest_score = true # 是否根据兴趣分数动态调整间隔
|
use_interest_score = true # 是否根据兴趣分数动态调整间隔
|
||||||
@@ -592,7 +592,7 @@ min_interest_score = 0.0 # 最低兴趣分数阈值,低于此值不会主动
|
|||||||
max_interest_score = 1.0 # 最高兴趣分数阈值,高于此值不会主动思考
|
max_interest_score = 1.0 # 最高兴趣分数阈值,高于此值不会主动思考
|
||||||
|
|
||||||
# --- 时间策略配置 ---
|
# --- 时间策略配置 ---
|
||||||
enable_time_strategy = false # 是否启用时间策略(根据时段调整频率)
|
enable_time_strategy = true # 是否启用时间策略(根据时段调整频率)
|
||||||
quiet_hours_start = "00:00" # 安静时段开始时间,格式: "HH:MM"
|
quiet_hours_start = "00:00" # 安静时段开始时间,格式: "HH:MM"
|
||||||
quiet_hours_end = "07:00" # 安静时段结束时间,格式: "HH:MM"
|
quiet_hours_end = "07:00" # 安静时段结束时间,格式: "HH:MM"
|
||||||
active_hours_multiplier = 0.7 # 活跃时段间隔倍数,<1表示更频繁,>1表示更稀疏
|
active_hours_multiplier = 0.7 # 活跃时段间隔倍数,<1表示更频繁,>1表示更稀疏
|
||||||
@@ -600,7 +600,7 @@ active_hours_multiplier = 0.7 # 活跃时段间隔倍数,<1表示更频繁,>
|
|||||||
# --- 冷却与限制 ---
|
# --- 冷却与限制 ---
|
||||||
reply_reset_enabled = true # bot回复后是否重置定时器(避免回复后立即又主动发言)
|
reply_reset_enabled = true # bot回复后是否重置定时器(避免回复后立即又主动发言)
|
||||||
topic_throw_cooldown = 3600 # 主动发言后的冷却时间(秒),期间暂停主动思考,等待用户回复。0表示不暂停,继续主动思考
|
topic_throw_cooldown = 3600 # 主动发言后的冷却时间(秒),期间暂停主动思考,等待用户回复。0表示不暂停,继续主动思考
|
||||||
max_daily_proactive = 0 # 每个聊天流每天最多主动发言次数,0表示不限制
|
max_daily_proactive = 3 # 每个聊天流每天最多主动发言次数,0表示不限制
|
||||||
|
|
||||||
# --- 决策权重配置 ---
|
# --- 决策权重配置 ---
|
||||||
do_nothing_weight = 0.4 # do_nothing动作的基础权重
|
do_nothing_weight = 0.4 # do_nothing动作的基础权重
|
||||||
@@ -608,5 +608,5 @@ simple_bubble_weight = 0.3 # simple_bubble动作的基础权重
|
|||||||
throw_topic_weight = 0.3 # throw_topic动作的基础权重
|
throw_topic_weight = 0.3 # throw_topic动作的基础权重
|
||||||
|
|
||||||
# --- 调试与监控 ---
|
# --- 调试与监控 ---
|
||||||
enable_statistics = true # 是否启用统计功能(记录触发次数、决策分布等)
|
enable_statistics = false # 是否启用统计功能(记录触发次数、决策分布等)
|
||||||
log_decisions = false # 是否记录每次决策的详细日志(用于调试)
|
log_decisions = false # 是否记录每次决策的详细日志(用于调试)
|
||||||
Reference in New Issue
Block a user