236 lines
9.5 KiB
TOML
236 lines
9.5 KiB
TOML
[inner]
|
||
version = "1.0.1"
|
||
|
||
|
||
#以下是给开发人员阅读的,一般用户不需要阅读
|
||
#如果你想要修改配置文件,请在修改后将version的值进行变更
|
||
#如果新增项目,请在BotConfig类下新增相应的变量
|
||
#1.如果你修改的是[]层级项目,例如你新增了 [memory],那么请在config.py的 load_config函数中的include_configs字典中新增"内容":{
|
||
#"func":memory,
|
||
#"support":">=0.0.0", #新的版本号
|
||
#"necessary":False #是否必须
|
||
#}
|
||
#2.如果你修改的是[]下的项目,例如你新增了[memory]下的 memory_ban_words ,那么请在config.py的 load_config函数中的 memory函数下新增版本判断:
|
||
# if config.INNER_VERSION in SpecifierSet(">=0.0.2"):
|
||
# config.memory_ban_words = set(memory_config.get("memory_ban_words", []))
|
||
|
||
# 版本格式:主版本号.次版本号.修订号,版本号递增规则如下:
|
||
# 主版本号:当你做了不兼容的 API 修改,
|
||
# 次版本号:当你做了向下兼容的功能性新增,
|
||
# 修订号:当你做了向下兼容的问题修正。
|
||
# 先行版本号及版本编译信息可以加到“主版本号.次版本号.修订号”的后面,作为延伸。
|
||
|
||
[bot]
|
||
qq = 114514
|
||
nickname = "麦麦"
|
||
alias_names = ["麦叠", "牢麦"]
|
||
|
||
[groups]
|
||
talk_allowed = [
|
||
123,
|
||
123,
|
||
] #可以回复消息的群号码
|
||
talk_frequency_down = [] #降低回复频率的群号码
|
||
ban_user_id = [] #禁止回复和读取消息的QQ号
|
||
|
||
[personality]
|
||
prompt_personality = [
|
||
"用一句话或几句话描述性格特点和其他特征",
|
||
"例如,是一个热爱国家热爱党的新时代好青年",
|
||
"例如,曾经是一个学习地质的女大学生,现在学习心理学和脑科学,你会刷贴吧"
|
||
]
|
||
personality_1_probability = 0.7 # 第一种人格出现概率
|
||
personality_2_probability = 0.2 # 第二种人格出现概率,可以为0
|
||
personality_3_probability = 0.1 # 第三种人格出现概率,请确保三个概率相加等于1
|
||
|
||
[schedule]
|
||
enable_schedule_gen = true # 是否启用日程表(尚未完成)
|
||
prompt_schedule_gen = "用几句话描述描述性格特点或行动规律,这个特征会用来生成日程表"
|
||
schedule_doing_update_interval = 900 # 日程表更新间隔 单位秒
|
||
|
||
[platforms] # 必填项目,填写每个平台适配器提供的链接
|
||
qq="http://127.0.0.1:18002/api/message"
|
||
|
||
|
||
[message]
|
||
max_context_size = 15 # 麦麦获得的上文数量,建议15,太短太长都会导致脑袋尖尖
|
||
emoji_chance = 0.2 # 麦麦使用表情包的概率
|
||
thinking_timeout = 120 # 麦麦最长思考时间,超过这个时间的思考会放弃
|
||
max_response_length = 1024 # 麦麦回答的最大token数
|
||
ban_words = [
|
||
# "403","张三"
|
||
]
|
||
|
||
ban_msgs_regex = [
|
||
# 需要过滤的消息(原始消息)匹配的正则表达式,匹配到的消息将被过滤(支持CQ码),若不了解正则表达式请勿修改
|
||
#"https?://[^\\s]+", # 匹配https链接
|
||
#"\\d{4}-\\d{2}-\\d{2}", # 匹配日期
|
||
# "\\[CQ:at,qq=\\d+\\]" # 匹配@
|
||
]
|
||
|
||
[willing]
|
||
willing_mode = "classical" # 回复意愿模式 经典模式
|
||
# willing_mode = "dynamic" # 动态模式(可能不兼容)
|
||
# willing_mode = "custom" # 自定义模式(可自行调整
|
||
response_willing_amplifier = 1 # 麦麦回复意愿放大系数,一般为1
|
||
response_interested_rate_amplifier = 1 # 麦麦回复兴趣度放大系数,听到记忆里的内容时放大系数
|
||
down_frequency_rate = 3 # 降低回复频率的群组回复意愿降低系数 除法
|
||
emoji_response_penalty = 0.1 # 表情包回复惩罚系数,设为0为不回复单个表情包,减少单独回复表情包的概率
|
||
|
||
[response]
|
||
model_r1_probability = 0.8 # 麦麦回答时选择主要回复模型1 模型的概率
|
||
model_v3_probability = 0.1 # 麦麦回答时选择次要回复模型2 模型的概率
|
||
model_r1_distill_probability = 0.1 # 麦麦回答时选择次要回复模型3 模型的概率
|
||
|
||
[emoji]
|
||
check_interval = 15 # 检查破损表情包的时间间隔(分钟)
|
||
register_interval = 60 # 注册表情包的时间间隔(分钟)
|
||
auto_save = true # 是否保存表情包和图片
|
||
enable_check = false # 是否启用表情包过滤
|
||
check_prompt = "符合公序良俗" # 表情包过滤要求
|
||
|
||
[memory]
|
||
build_memory_interval = 2000 # 记忆构建间隔 单位秒 间隔越低,麦麦学习越多,但是冗余信息也会增多
|
||
build_memory_distribution = [4.0,2.0,0.6,24.0,8.0,0.4] # 记忆构建分布,参数:分布1均值,标准差,权重,分布2均值,标准差,权重
|
||
build_memory_sample_num = 10 # 采样数量,数值越高记忆采样次数越多
|
||
build_memory_sample_length = 20 # 采样长度,数值越高一段记忆内容越丰富
|
||
memory_compress_rate = 0.1 # 记忆压缩率 控制记忆精简程度 建议保持默认,调高可以获得更多信息,但是冗余信息也会增多
|
||
|
||
forget_memory_interval = 1000 # 记忆遗忘间隔 单位秒 间隔越低,麦麦遗忘越频繁,记忆更精简,但更难学习
|
||
memory_forget_time = 24 #多长时间后的记忆会被遗忘 单位小时
|
||
memory_forget_percentage = 0.01 # 记忆遗忘比例 控制记忆遗忘程度 越大遗忘越多 建议保持默认
|
||
|
||
memory_ban_words = [ #不希望记忆的词
|
||
# "403","张三"
|
||
]
|
||
|
||
[mood]
|
||
mood_update_interval = 1.0 # 情绪更新间隔 单位秒
|
||
mood_decay_rate = 0.95 # 情绪衰减率
|
||
mood_intensity_factor = 1.0 # 情绪强度因子
|
||
|
||
[keywords_reaction] # 针对某个关键词作出反应
|
||
enable = true # 关键词反应功能的总开关
|
||
|
||
[[keywords_reaction.rules]] # 如果想要新增多个关键词,直接复制本条,修改keywords和reaction即可
|
||
enable = true # 是否启用此条(为了人类在未来AI战争能更好地识别AI(bushi),默认开启)
|
||
keywords = ["人机", "bot", "机器", "入机", "robot", "机器人","ai","AI"] # 会触发反应的关键词
|
||
reaction = "有人说你是人机或者机器人,否定这一事实,攻击或反问他。注意,只有认为你是机器人才回复,否则不要否认" # 触发之后添加的提示词
|
||
|
||
[[keywords_reaction.rules]] # 就像这样复制
|
||
enable = false # 仅作示例,不会触发
|
||
keywords = ["测试关键词回复","test",""]
|
||
reaction = "回答“测试成功”"
|
||
|
||
[chinese_typo]
|
||
enable = true # 是否启用中文错别字生成器
|
||
error_rate=0.001 # 单字替换概率
|
||
min_freq=9 # 最小字频阈值
|
||
tone_error_rate=0.1 # 声调错误概率
|
||
word_replace_rate=0.006 # 整词替换概率
|
||
|
||
[response_spliter]
|
||
enable_response_spliter = true # 是否启用回复分割器
|
||
response_max_length = 100 # 回复允许的最大长度
|
||
response_max_sentence_num = 4 # 回复允许的最大句子数
|
||
|
||
|
||
[remote] #发送统计信息,主要是看全球有多少只麦麦
|
||
enable = true
|
||
|
||
[experimental]
|
||
enable_friend_chat = false # 是否启用好友聊天
|
||
enable_think_flow = false # 是否启用思维流 注意:可能会消耗大量token,请谨慎开启
|
||
#思维流适合搭配低能耗普通模型使用,例如qwen2.5 32b
|
||
|
||
#下面的模型若使用硅基流动则不需要更改,使用ds官方则改成.env自定义的宏,使用自定义模型则选择定位相似的模型自己填写
|
||
#推理模型
|
||
|
||
# 额外字段
|
||
# 下面的模型有以下额外字段可以添加:
|
||
|
||
# stream = <true|false> : 用于指定模型是否是使用流式输出
|
||
# 如果不指定,则该项是 False
|
||
|
||
[model.llm_reasoning] #回复模型1 主要回复模型
|
||
name = "Pro/deepseek-ai/DeepSeek-R1"
|
||
# name = "Qwen/QwQ-32B"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 4 #模型的输入价格(非必填,可以记录消耗)
|
||
pri_out = 16 #模型的输出价格(非必填,可以记录消耗)
|
||
|
||
[model.llm_reasoning_minor] #回复模型3 次要回复模型
|
||
name = "deepseek-ai/DeepSeek-R1-Distill-Qwen-32B"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 1.26 #模型的输入价格(非必填,可以记录消耗)
|
||
pri_out = 1.26 #模型的输出价格(非必填,可以记录消耗)
|
||
|
||
#非推理模型
|
||
|
||
[model.llm_normal] #V3 回复模型2 次要回复模型
|
||
name = "Pro/deepseek-ai/DeepSeek-V3"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 2 #模型的输入价格(非必填,可以记录消耗)
|
||
pri_out = 8 #模型的输出价格(非必填,可以记录消耗)
|
||
|
||
[model.llm_emotion_judge] #表情包判断
|
||
name = "Qwen/Qwen2.5-14B-Instruct"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 0.7
|
||
pri_out = 0.7
|
||
|
||
[model.llm_topic_judge] #记忆主题判断:建议使用qwen2.5 7b
|
||
name = "Pro/Qwen/Qwen2.5-7B-Instruct"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 0
|
||
pri_out = 0
|
||
|
||
[model.llm_summary_by_topic] #概括模型,建议使用qwen2.5 32b 及以上
|
||
name = "Qwen/Qwen2.5-32B-Instruct"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 1.26
|
||
pri_out = 1.26
|
||
|
||
[model.moderation] #内容审核,开发中
|
||
name = ""
|
||
provider = "SILICONFLOW"
|
||
pri_in = 1.0
|
||
pri_out = 2.0
|
||
|
||
# 识图模型
|
||
|
||
[model.vlm] #图像识别
|
||
name = "Pro/Qwen/Qwen2.5-VL-7B-Instruct"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 0.35
|
||
pri_out = 0.35
|
||
|
||
#嵌入模型
|
||
|
||
[model.embedding] #嵌入
|
||
name = "BAAI/bge-m3"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 0
|
||
pri_out = 0
|
||
|
||
#测试模型,给think_glow用,如果你没开实验性功能,随便写就行,但是要有
|
||
[model.llm_outer_world] #外世界判断:建议使用qwen2.5 7b
|
||
# name = "Pro/Qwen/Qwen2.5-7B-Instruct"
|
||
name = "Qwen/Qwen2.5-7B-Instruct"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 0
|
||
pri_out = 0
|
||
|
||
[model.llm_sub_heartflow] #心流:建议使用qwen2.5 7b
|
||
# name = "Pro/Qwen/Qwen2.5-7B-Instruct"
|
||
name = "Qwen/Qwen2.5-32B-Instruct"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 1.26
|
||
pri_out = 1.26
|
||
|
||
[model.llm_heartflow] #心流:建议使用qwen2.5 32b
|
||
# name = "Pro/Qwen/Qwen2.5-7B-Instruct"
|
||
name = "Qwen/Qwen2.5-32B-Instruct"
|
||
provider = "SILICONFLOW"
|
||
pri_in = 1.26
|
||
pri_out = 1.26 |