-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig_template.toml
More file actions
198 lines (137 loc) · 6.04 KB
/
config_template.toml
File metadata and controls
198 lines (137 loc) · 6.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# Mai-Soul-Engine - 配置模板
# 使用方式:
# 1) 复制本文件为 config.toml
# 2) 按需修改配置
# 3) config.toml 已加入 .gitignore(不要提交包含你私人信息的配置)
# 管理员配置
[admin]
# 管理员用户ID(必填,格式:平台:ID,如 qq:768295235)
admin_user_id = ""
# 启用插件
enabled = true
# 演化设置
[evolution]
# 启用自动演化
evolution_enabled = true
# 演化周期(小时)
evolution_interval_hours = 1.0
# 每次演化最大变化值
evolution_rate = 5
# EMA平滑系数(0-1,越大变化越快)
ema_alpha = 0.3
# 反向变动阻力(0-1,越大阻力越强)
direction_resistance = 0.5
# 每次分析的最大消息数
max_messages_per_analysis = 200
# 每条消息的最大字符数
max_chars_per_message = 200
# 监控范围(演化仅针对监控群)
[monitor]
# 监控的群ID列表(空=不分析任何群),格式:平台:群号:group(或直接填stream_id)
monitored_groups = []
# 排除的群ID列表,格式:平台:群号:group(或直接填stream_id)
excluded_groups = []
# 监控的用户ID列表(空=全部),格式:平台:ID
monitored_users = []
# 排除的用户ID列表,格式:平台:ID
excluded_users = []
# 档位阈值
[threshold]
# 启用极端档位(98-100触发)
enable_extreme = false
# 自定义提示词模板(覆盖默认)
custom_prompts = { }
# 注入设置
[injection]
# 群聊注入范围:global=所有群,monitored_only=仅 monitored_groups(仍受 excluded_groups 影响)
scope = "global"
# 是否允许私聊注入(默认开启)
inject_private = true
# 每次注入最多携带的 trait 数量
max_traits = 3
# 当无 tags 命中时,是否 fallback 注入“最近影响最大”的 traits(避免完全空窗)
fallback_recent_impact = true
# trait 冷却时间(秒)。冷却期间同一 trait 不会被重复注入(避免刷屏)
trait_cooldown_seconds = 180
# 思维阁设置
[thought_cabinet]
# 启用思维阁系统(默认关闭)
enabled = false
# 思维种子上限
max_seeds = 20
# 最小触发强度
min_trigger_intensity = 0.7
# 启用管理员审核通知
admin_notification_enabled = true
# 自动合并相似 trait(去重,避免同义 trait 越积越多)
auto_dedup_enabled = true
# 自动去重阈值(0-1,越高越严格)
auto_dedup_threshold = 0.78
# API 设置
[api]
# 启用 Soul HTTP API(/api/v1/soul/*)
enabled = true
# 访问令牌(可选)。前端请求头:X-Soul-Token;也可用环境变量 SOUL_API_TOKEN 覆盖
token = ""
# 公共展示模式:对外展示时减少/脱敏敏感字段(targets、evidence、注入细节等)
public_mode = false
# Notion 前端展示(可选)
# 说明:
# - 把 traits 与意识形态光谱同步到 Notion 数据库,你可以在 Notion 里基于数据库自建公共展示页(过滤/排序/分组/画廊都行)
# - 强烈建议:token 使用环境变量 MAIBOT_SOUL_NOTION_TOKEN 提供,避免写入配置文件
[notion]
# 启用 Notion 数据库同步(公共展示前端,可选)
enabled = false
# Notion Integration Token(可留空,推荐用环境变量 MAIBOT_SOUL_NOTION_TOKEN)
token = ""
# Notion traits(思维阁 / Traits)数据库 ID(复制链接取 32 位 ID,带不带短横线都行)
# 说明:这里存放的是“固化 trait”(来自思维阁审核内化后的观点),用于公共展示。
database_id = ""
# 是否同步意识形态光谱到 Notion(需要配置 spectrum_database_id)
sync_spectrum = true
# Notion 光谱数据库 ID(复制链接取 32 位 ID)
# 说明:这里存放的是“光谱图表数据”(按维度拆分为多行),用于画图展示。
spectrum_database_id = ""
# 光谱记录 scope_id(默认 global)
spectrum_scope_id = "global"
# 同步间隔(秒,最小 60)
sync_interval_seconds = 600
# 启动后首次同步延迟(秒)
first_delay_seconds = 5
# 单次最多同步的 trait 数量(按创建时间倒序)
max_traits = 200
# 新建 trait 时默认 Visibility 值(建议 Public)
visibility_default = "Public"
# 永不覆盖用户可编辑字段(Name/Question/Thought/Visibility)。仅在新建时写入
never_overwrite_user_fields = true
# 写入 Notion 的长文本最大长度(字符)
max_rich_text_chars = 1800
# traits(思维阁 / Traits)数据库字段名映射(按你在 Notion 里创建的属性名来填)
property_title = "Name" # Title
property_trait_id = "TraitId" # rich_text(用于去重/更新)
property_tags = "Tags" # multi_select
property_question = "Question" # rich_text
property_thought = "Thought" # rich_text
property_confidence = "Confidence" # number (0-100)
property_impact_score = "ImpactScore" # number
property_status = "Status" # select: Active/Disabled/Deleted
property_visibility = "Visibility" # select: Public/Internal...
property_updated_at = "UpdatedAt" # date
# 光谱数据库字段名映射(建议使用独立数据库)
# 光谱同步模式:
# - dimension_rows:四行一个 Value(你现在的表结构,Title=Dimension,按 Dimension 分组画图)
# - single_row:单行四列(Economic/Social/...)
spectrum_mode = "dimension_rows"
# 光谱数据库字段名映射(dimension_rows:你当前的结构,4 行 + Value)
spectrum_property_title = "Dimension" # Title(第一列,建议就叫 Dimension)
spectrum_property_scope_id = "ScopeId" # rich_text 或 select(插件会兼容)
spectrum_property_value = "Value" # number (0-100)
# 光谱数据库字段名映射(single_row,兼容旧结构;dimension_rows 下可不填)
spectrum_property_economic = "Economic" # number (0-100)
spectrum_property_social = "Social" # number (0-100)
spectrum_property_diplomatic = "Diplomatic" # number (0-100)
spectrum_property_progressive = "Progressive" # number (0-100)
# 以下字段为可选:数据库不存在也不会影响同步(若你建了就会写入)
spectrum_property_initialized = "Initialized" # checkbox
spectrum_property_last_evolution = "LastEvolution" # date
spectrum_property_updated_at = "UpdatedAt" # date