-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path_conf_schema.json
More file actions
441 lines (441 loc) · 15.6 KB
/
Copy path_conf_schema.json
File metadata and controls
441 lines (441 loc) · 15.6 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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
{
"l1_buffer": {
"type": "object",
"description": "L1 消息上下文缓冲",
"hint": "将最近的对话加入 LLM 上下文,超量时自动总结为长期记忆",
"items": {
"enable": {
"type": "bool",
"default": true,
"description": "启用 L1 上下文缓冲"
},
"summary_provider": {
"type": "string",
"default": "",
"description": "总结模型",
"hint": "用于 L1 缓冲总结的模型,留空则使用默认 Provider",
"_special": "select_provider"
},
"inject_queue_length": {
"type": "int",
"default": 50,
"description": "上下文消息条数",
"hint": "注入 LLM 上下文的最大消息条数,超量时自动总结旧消息为长期记忆。越大上下文越完整,但 Token 消耗越多,最少20条"
},
"image_parsing": {
"type": "object",
"description": "图片解析",
"hint": "将图片内容解析为文字描述,注入 LLM 上下文",
"items": {
"enable": {
"type": "bool",
"default": false,
"description": "启用图片解析",
"hint": "视觉解析会产生额外 LLM 调用,默认关闭;完成限流配置后再显式启用"
},
"provider": {
"type": "string",
"default": "",
"description": "图片解析模型 Provider",
"hint": "选择支持视觉能力的模型,留空则使用默认 Provider",
"_special": "select_provider"
},
"mode": {
"type": "string",
"default": "related",
"description": "解析模式",
"hint": "全:所有图片;相关:触发LLM/被引用/OCR命中的图片",
"options": [
"all",
"related"
]
},
"daily_quota": {
"type": "int",
"default": 200,
"description": "每日解析限额",
"hint": "全局共享计数器,超限后静默跳过,每日00:00重置"
}
}
}
}
},
"learning": {
"type": "object",
"description": "学习模块",
"hint": "从群聊对话中学习表达风格、对话样例与圈内暗语,注入 LLM 上下文让回复更贴合群氛围",
"items": {
"enable": {
"type": "bool",
"default": false,
"description": "启用学习模块",
"hint": "学习群聊表达风格、对话样例与暗语,采集与审查过程会消耗少量 LLM Token"
},
"jargon_enable": {
"type": "bool",
"default": true,
"description": "启用暗语学习",
"hint": "通过多用户滚动统计和少量批量 LLM 审查自动发现群内暗语,命中时注入解释"
},
"review_provider": {
"type": "string",
"default": "",
"description": "审查/推断模型",
"hint": "用于学习模块内容审查与暗语含义推断的模型,留空则使用默认 Provider",
"_special": "select_provider"
},
"review_batch_size": {
"type": "int",
"default": 10,
"description": "攒批审查数量",
"hint": "待审查的对话对与表达模式累计达到此数量时触发一次 LLM 批量审查"
},
"pattern_max_count": {
"type": "int",
"default": 300,
"description": "表达模式上限",
"hint": "已学习的表达模式最大数量,超量时按命中率淘汰"
},
"pattern_decay_days": {
"type": "int",
"default": 15,
"description": "表达模式衰减天数",
"hint": "表达模式超过此天数未被命中将衰减淘汰"
}
}
},
"persona_evolution": {
"type": "object",
"description": "人格自迭代",
"hint": "根据群聊真人发言的表达风格迭代 AstrBot Persona,全程保留版本快照,支持逐字差异与回滚",
"items": {
"enable": {
"type": "bool",
"default": false,
"description": "启用人格自迭代",
"hint": "总开关:关闭时不采集语料、不调度迭代任务;迭代执行会消耗 LLM Token"
},
"provider": {
"type": "string",
"default": "",
"description": "分析与生成模型",
"hint": "用于风格归纳与人格候选生成的模型,留空则使用默认 Provider",
"_special": "select_provider"
},
"review_provider": {
"type": "string",
"default": "",
"description": "完整人格审查模型",
"hint": "完整人格模式的独立审查模型,留空则复用分析与生成模型",
"_special": "select_provider"
},
"sample_retention_days": {
"type": "int",
"default": 30,
"description": "语料保留天数",
"hint": "风格语料超过此天数自动删除"
},
"sample_max_count": {
"type": "int",
"default": 20000,
"description": "全局语料上限",
"hint": "风格语料最大条数,超量时按最旧优先删除"
}
}
},
"l2_memory": {
"type": "object",
"description": "L2 记忆库",
"hint": "使用 ChromaDB 存储长期记忆向量",
"items": {
"enable": {
"type": "bool",
"default": true,
"description": "启用 L2 记忆库"
},
"embedding_source": {
"type": "string",
"default": "provider",
"description": "嵌入模型来源",
"hint": "Provider:使用 AstrBot 配置的 Embedding 服务(推荐,无需下载模型);本地:使用内置 sentence-transformers 模型(需下载约 96MB 模型文件)",
"options": [
"provider",
"local"
]
},
"embedding_provider": {
"type": "string",
"default": "",
"description": "Embedding Provider ID",
"hint": "填写 AstrBot 中配置的 Embedding Provider ID(可在 AstrBot 管理面板的「模型」页面查看),留空则自动使用第一个可用的"
},
"embedding_model": {
"type": "string",
"default": "BAAI/bge-small-zh-v1.5",
"description": "本地嵌入模型",
"hint": "仅当嵌入来源为「本地」时生效。更换后需重建记忆库",
"options": [
"BAAI/bge-small-zh-v1.5",
"moka-ai/m3e-small",
"moka-ai/m3e-base",
"BAAI/bge-base-zh-v1.5",
"shibing624/text2vec-base-chinese",
"all-MiniLM-L6-v2"
]
},
"top_k": {
"type": "int",
"default": 10,
"description": "检索 Top-K",
"hint": "从记忆库检索的相关记忆数量"
},
"relevance_threshold": {
"type": "float",
"default": 0.3,
"description": "相关性阈值",
"hint": "低于此分数的检索结果将被过滤,0 表示不过滤,推荐 0.2-0.5"
},
"enable_hybrid_retrieval": {
"type": "bool",
"default": true,
"description": "启用混合检索",
"hint": "同时使用向量语义与关键词(BM25/FTS5)双路召回并以 RRF 融合排序,提升专名、术语、数字等关键词的召回率"
}
}
},
"l3_kg": {
"type": "object",
"description": "L3 知识图谱",
"hint": "使用 SQLite 存储实体关系图谱",
"items": {
"enable": {
"type": "bool",
"default": true,
"description": "启用 L3 知识图谱"
},
"extraction_provider": {
"type": "string",
"default": "",
"description": "L3 实体提取模型 Provider",
"hint": "选择用于知识图谱实体提取的模型,留空则使用默认 Provider",
"_special": "select_provider"
}
}
},
"profile": {
"type": "object",
"description": "画像系统",
"hint": "记录群聊画像和用户画像",
"items": {
"enable": {
"type": "bool",
"default": true,
"description": "启用画像系统"
},
"analysis_provider": {
"type": "string",
"default": "",
"description": "画像分析模型 Provider",
"hint": "选择用于画像分析的模型,留空则使用默认 Provider",
"_special": "select_provider"
},
"enable_auto_injection": {
"type": "bool",
"default": true,
"description": "启用画像自动注入",
"hint": "在每次LLM请求前自动注入画像到system_prompt"
},
"favorability_enable": {
"type": "bool",
"default": true,
"description": "启用好感度功能",
"hint": "记录用户与bot的好感度(0-100),随互动演化并影响回复语气"
}
}
},
"isolation_config": {
"type": "object",
"description": "隔离配置",
"hint": "(谨慎修改)控制记忆和图谱的隔离策略",
"items": {
"enable_group_memory_isolation": {
"type": "bool",
"default": false,
"description": "启用群聊记忆隔离",
"hint": "各群聊记忆独立存储,关闭则全局共享"
},
"enable_group_isolation": {
"type": "bool",
"default": false,
"description": "启用群聊用户画像隔离",
"hint": "各群聊用户画像独立存储,关闭则全局共享,切换会导致用户画像重建"
},
"enable_persona_isolation": {
"type": "bool",
"default": false,
"description": "启用bot人格隔离",
"hint": "不同bot人格的记忆与画像按人格ID逻辑隔离(共享底层存储、命名空间互不可见);切换人格仅改变可见数据,不删除或重建"
}
}
},
"scheduled_tasks": {
"type": "object",
"description": "梦境任务",
"hint": "记忆的离线增量加工:时间锚定、共享扫描的记忆协调、知识归纳、persona 级 L2 清洗与每轮一次的全局 L3 维护",
"items": {
"enable_dream": {
"type": "bool",
"default": false,
"description": "启用梦境任务",
"hint": "高成本离线任务,默认关闭"
},
"provider": {
"type": "string",
"default": "",
"description": "梦境任务模型 Provider",
"hint": "选择用于执行梦境任务的模型,留空则使用默认 Provider",
"_special": "select_provider"
},
"dream_stage_temporal_anchor_enabled": {
"type": "bool",
"default": true,
"description": "时间锚定",
"hint": "在合并前以确定性规则将相对时间表达(昨天、上周等)转换为绝对日期,不调用 LLM"
},
"dream_stage_reconciliation_enabled": {
"type": "bool",
"default": true,
"description": "记忆协调",
"hint": "共享一次向量近邻扫描,批量完成重复合并与矛盾消解"
},
"dream_stage_knowledge_induction_enabled": {
"type": "bool",
"default": true,
"description": "知识归纳",
"hint": "增量发现行为模式,并从 L2 提取实体关系写入 persona 隔离的 L3 图谱"
},
"dream_stage_l2_pruning_enabled": {
"type": "bool",
"default": true,
"description": "L2 遗忘清洗",
"hint": "按 persona 淘汰低价值向量记忆"
},
"dream_stage_l3_maintenance_enabled": {
"type": "bool",
"default": true,
"description": "L3 全局维护",
"hint": "每轮执行一次图谱去重、无主节点清理和低价值节点淘汰"
},
"dream_max_llm_calls_per_run": {
"type": "int",
"default": 20,
"description": "单轮 LLM 调用硬上限",
"hint": "达到上限立即停止后续 persona/阶段,下一轮继续"
},
"dream_max_runtime_minutes": {
"type": "int",
"default": 20,
"description": "单轮最长运行分钟数"
},
"dream_max_groups_per_stage": {
"type": "int",
"default": 5,
"description": "单阶段最多处理的分组数"
},
"dream_min_call_interval_ms": {
"type": "int",
"default": 500,
"description": "Dream 两次 LLM 调用最小间隔(ms)"
}
}
},
"context_control": {
"type": "object",
"description": "上下文接管",
"hint": "控制 AstrBot 内置对话历史的管理策略,确保上下文完全由本插件的 L1/L2/L3 记忆系统接管",
"items": {
"enable_conversation_cleanup": {
"type": "bool",
"default": true,
"description": "启用上下文接管",
"hint": "开启后,每次 LLM 请求前自动清空 AstrBot 内置对话历史(req.contexts),上下文完全由本插件的记忆系统提供。保留对话 ID 以兼容 AstrBot 主动回复功能。关闭后 AstrBot 将保留并使用内置对话历史"
}
}
},
"proactive": {
"type": "object",
"description": "主动回复",
"hint": "统一决策主动回复(跟话/跟进/发起)。更多高级参数在插件页面「隐藏参数」中调整",
"items": {
"enabled": {
"type": "bool",
"default": true,
"description": "启用主动回复",
"hint": "总开关。关闭后不进行任何主动发言评估(管理指令仍可用)"
},
"proactive_enabled": {
"type": "bool",
"default": false,
"description": "启用主动发起话题",
"hint": "开启后 Iris 会在群冷场或话题结束时主动开启新话题"
},
"stats_enabled": {
"type": "bool",
"default": false,
"description": "启用决策统计",
"hint": "开启后在插件页面记录每次决策的 prompt 与结果,便于调优"
},
"provider_id": {
"type": "string",
"default": "",
"description": "决策模型 Provider",
"hint": "主动回复统一决策使用的模型,留空则使用默认 Provider",
"_special": "select_provider"
}
}
},
"extras": {
"type": "object",
"description": "辅助功能",
"hint": "低成本的消息触发与输出优化功能",
"items": {
"pure_at_reply": {
"type": "object",
"description": "纯 @ 回复",
"hint": "让单独 @ 机器人的消息进入标准 LLM 管道,并仅使用已有 L1 上下文",
"items": {
"enable": {
"type": "bool",
"default": false,
"description": "启用纯 @ 回复接管",
"hint": "启用前需在 AstrBot 平台设置中关闭「只 @ 机器人是否触发等待」(platform_settings.empty_mention_waiting),否则纯 @ 会先被 AstrBot 内置处理器拦截"
}
}
},
"error_friendly": {
"type": "object",
"description": "错误消息友好化",
"items": {
"enable": {
"type": "bool",
"default": true,
"description": "启用错误消息友好化",
"hint": "将框架发送的技术性错误消息替换为友好的提示语"
}
}
},
"markdown_stripper": {
"type": "object",
"description": "Markdown 格式去除器",
"items": {
"enable": {
"type": "bool",
"default": true,
"description": "启用 Markdown 去除功能",
"hint": "当文本以纯文本形式发送时,自动去除 Markdown 格式标记(如 **粗体**、*斜体* 等),提升可读性"
}
}
}
}
}
}