创建了新的反注入
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
[inner]
|
||||
version = "7.6.5"
|
||||
version = "7.6.6"
|
||||
|
||||
#----以下是给开发人员阅读的,如果你只是部署了MoFox-Bot,不需要阅读----
|
||||
#如果你想要修改配置文件,请递增version的值
|
||||
@@ -185,32 +185,6 @@ notice_time_window = 3600 # notice时间窗口(秒),只有这个时间范
|
||||
max_notices_per_chat = 30 # 每个聊天保留的notice数量上限
|
||||
notice_retention_time = 86400 # notice保留时间(秒),默认24小时
|
||||
|
||||
[anti_prompt_injection] # LLM反注入系统配置
|
||||
enabled = false # 是否启用反注入系统
|
||||
enabled_rules = false # 是否启用规则检测
|
||||
enabled_LLM = false # 是否启用LLM检测
|
||||
process_mode = "lenient" # 处理模式:strict(严格模式,直接丢弃), lenient(宽松模式,消息加盾), auto(自动模式), counter_attack(反击模式,使用LLM反击并丢弃消息)
|
||||
# 白名单配置
|
||||
# 格式:[[platform, user_id], ...]
|
||||
# 示例:[["qq", "123456"], ["telegram", "user789"]]
|
||||
whitelist = [] # 用户白名单,这些用户的消息将跳过检测
|
||||
# LLM检测配置
|
||||
llm_detection_enabled = true # 是否启用LLM二次分析
|
||||
llm_detection_threshold = 0.7 # LLM判定危险的置信度阈值(0-1)
|
||||
# 性能配置
|
||||
cache_enabled = true # 是否启用检测结果缓存
|
||||
cache_ttl = 3600 # 缓存有效期(秒)
|
||||
max_message_length = 150 # 最大检测消息长度,超过将直接判定为危险
|
||||
# 统计配置
|
||||
stats_enabled = true # 是否启用统计功能
|
||||
# 自动封禁配置
|
||||
auto_ban_enabled = false # 是否启用自动封禁功能
|
||||
auto_ban_violation_threshold = 3 # 触发封禁的违规次数阈值
|
||||
auto_ban_duration_hours = 2 # 封禁持续时间(小时)
|
||||
# 消息加盾配置(宽松模式下使用)
|
||||
shield_prefix = "🛡️ " # 加盾消息前缀
|
||||
shield_suffix = " 🛡️" # 加盾消息后缀
|
||||
|
||||
[tool]
|
||||
enable_tool = true # 是否在普通聊天中启用工具
|
||||
|
||||
|
||||
Reference in New Issue
Block a user