-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy path_conf_schema.json
More file actions
750 lines (750 loc) · 27.8 KB
/
_conf_schema.json
File metadata and controls
750 lines (750 loc) · 27.8 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
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
{
"Dependency_Install_Guide": {
"description": "依赖安装",
"type": "object",
"hint": "依赖不会在插件安装或启动时自动安装。请进入插件 WebUI Dashboard 的全量设置顶部,手动点击基础能力依赖或全能力依赖。",
"obvious_hint": true,
"items": {
"dependency_install_entry": {
"description": "手动安装入口",
"type": "text",
"hint": "基础能力依赖:人格审查、黑话学习、表达方式学习与 WebUI 所需依赖。全能力依赖:在基础能力上增加图谱、监控、外部数据库、LightRAG 与 Mem0 等完整能力依赖。",
"default": "打开 WebUI Dashboard -> 全量设置 -> 手动安装依赖,选择“基础能力依赖”或“全能力依赖”。",
"_readonly": true,
"obvious_hint": true
}
}
},
"Self_Learning_Basic": {
"description": "基础学习设置",
"type": "object",
"hint": "控制插件的基本学习行为",
"items": {
"enable_message_capture": {
"description": "启用消息抓取",
"type": "bool",
"hint": "是否抓取用户消息用于学习。关闭后插件将停止收集新消息",
"default": true
},
"enable_auto_learning": {
"description": "启用自动学习",
"type": "bool",
"hint": "是否启用定时自动学习。关闭后需要手动触发学习",
"default": true
},
"enable_realtime_learning": {
"description": "启用实时学习",
"type": "bool",
"hint": "是否在收到消息时立即进行筛选处理。会增加实时负载",
"default": false
},
"enable_jargon_learning": {
"description": "启用黑话学习",
"type": "bool",
"hint": "是否启用黑话统计预筛、黑话挖掘和黑话上下文能力",
"default": true
},
"enable_style_learning": {
"description": "启用对话风格学习",
"type": "bool",
"hint": "是否启用自动风格学习、表达模式和相关学习批次处理",
"default": true
},
"enable_realtime_llm_filter": {
"description": "启用实时LLM筛选",
"type": "bool",
"hint": "是否对每条实时消息都使用LLM进行筛选。关闭可减少LLM调用频率",
"default": false
},
"enable_web_interface": {
"description": "启用Web管理界面",
"type": "bool",
"hint": "是否启用Web界面用于查看和管理学习数据",
"default": true
},
"web_interface_port": {
"description": "Web界面端口",
"type": "int",
"hint": "Web管理界面的访问端口号",
"default": 7833
},
"web_interface_host": {
"description": "Web界面监听地址",
"type": "string",
"hint": "Web管理界面绑定的地址。0.0.0.0 表示监听所有网卡(局域网可访问),127.0.0.1 表示仅本机可访问",
"default": "0.0.0.0"
}
}
},
"Target_Settings": {
"description": "抓取目标设置",
"type": "object",
"hint": "配置要学习哪些用户的消息",
"items": {
"target_qq_list": {
"description": "目标QQ号列表",
"type": "list",
"items": {
"type": "string"
},
"hint": "默认全量学习:留空、空行或填写 all/*/全部/全量 时学习所有非黑名单消息。也可填写个人QQ号或群聊格式 group_群号 作为白名单。",
"default": []
},
"target_blacklist": {
"description": "学习黑名单",
"type": "list",
"items": {
"type": "string"
},
"hint": "黑名单内的成员消息不进行学习。为空则没有黑名单。支持个人QQ号和群聊格式group_群号",
"default": []
},
"current_persona_name": {
"description": "当前目标人格",
"type": "string",
"hint": "插件将学习并优化此人格的对话风格。需要在人格设置中存在",
"default": "default"
}
}
},
"Model_Configuration": {
"description": "模型配置",
"type": "object",
"hint": "配置用于筛选和提炼的AI模型提供商",
"items": {
"filter_provider_id": {
"description": "筛选模型提供商",
"type": "string",
"hint": "用于消息筛选的提供商,建议选择速度快、成本低的模型如gpt-4o-mini",
"default": null,
"_special": "select_provider"
},
"refine_provider_id": {
"description": "提炼模型提供商",
"type": "string",
"hint": "用于深度分析和提炼对话风格的提供商,建议选择能力强的模型如gpt-4o",
"default": null,
"_special": "select_provider"
},
"reinforce_provider_id": {
"description": "强化模型提供商",
"type": "string",
"hint": "用于强化学习的提供商,建议选择能力强的模型",
"default": null,
"_special": "select_provider"
}
}
},
"Learning_Parameters": {
"description": "学习参数",
"type": "object",
"hint": "控制学习过程的各种参数",
"items": {
"learning_interval_hours": {
"description": "学习间隔(小时)",
"type": "int",
"hint": "自动学习的时间间隔,单位为小时",
"default": 6
},
"min_messages_for_learning": {
"description": "最少学习消息数量",
"type": "int",
"hint": "开始学习所需的最少消息数量",
"default": 50
},
"max_messages_per_batch": {
"description": "每批处理的最大消息数量",
"type": "int",
"hint": "单次学习处理的最大消息数量,避免一次处理过多消息",
"default": 200
},
"expression_learning_trigger_messages": {
"description": "表达方式学习触发消息数",
"type": "int",
"hint": "每个群每新增多少条原始消息才触发表达方式学习。调大可降低筛选/分析模型调用频率",
"default": 10
},
"topic_detection_interval_messages": {
"description": "话题检测触发消息数",
"type": "int",
"hint": "每个群每新增多少条消息才进行一次LLM话题检测。调大可降低筛选模型调用频率",
"default": 10
}
}
},
"Filter_Parameters": {
"description": "筛选参数",
"type": "object",
"hint": "控制消息筛选的参数",
"items": {
"message_min_length": {
"description": "消息最小长度",
"type": "int",
"hint": "参与学习的消息最小字符长度",
"default": 5
},
"message_max_length": {
"description": "消息最大长度",
"type": "int",
"hint": "参与学习的消息最大字符长度",
"default": 500
},
"confidence_threshold": {
"description": "筛选置信度阈值",
"type": "float",
"hint": "消息筛选的置信度阈值,0-1之间,越高越严格",
"default": 0.7
}
}
},
"Style_Analysis": {
"description": "风格分析参数",
"type": "object",
"hint": "控制对话风格分析的参数",
"items": {
"style_analysis_batch_size": {
"description": "风格分析批次大小",
"type": "int",
"hint": "单次风格分析处理的消息数量",
"default": 100
},
"style_update_threshold": {
"description": "风格更新阈值",
"type": "float",
"hint": "触发人格风格更新的置信度阈值,0-1之间",
"default": 0.8
}
}
},
"Advanced_Settings": {
"description": "高级设置",
"type": "object",
"hint": "高级用户配置选项",
"items": {
"debug_mode": {
"description": "调试模式",
"type": "bool",
"hint": "启用函数级性能监控,并在未指定日志等级时自动使用 debug",
"default": false
},
"log_level": {
"description": "AstrBot日志等级",
"type": "string",
"hint": "控制插件在 AstrBot 日志中的详细程度。error 最少,debug 最多",
"default": "info",
"options": [
"error",
"warning",
"info",
"debug"
]
},
"save_raw_messages": {
"description": "保存原始消息",
"type": "bool",
"hint": "是否保存未经处理的原始消息用于分析",
"default": true
},
"auto_backup_interval_days": {
"description": "自动备份间隔(天)",
"type": "int",
"hint": "学习数据自动备份的间隔天数,0为禁用",
"default": 7
},
"auto_apply_approved_persona": {
"description": "⚠️ 审查批准后自动应用到默认人格",
"type": "bool",
"hint": "【危险功能 - 谨慎开启】批准人格审查后自动将内容直接应用到当前使用的默认人格,而非创建新人格副本。开启后将直接覆盖正在使用的默认人格的系统提示词,此操作不可逆(除非从备份恢复)。强烈建议同时开启人格自动备份功能以防止数据丢失",
"default": false
}
}
},
"Machine_Learning_Settings": {
"description": "机器学习设置",
"type": "object",
"hint": "轻量级机器学习分析配置",
"items": {
"enable_ml_analysis": {
"description": "启用ML分析",
"type": "bool",
"hint": "是否启用scikit-learn进行文本聚类和行为分析",
"default": true
},
"max_ml_sample_size": {
"description": "ML样本最大数量",
"type": "int",
"hint": "机器学习分析的最大样本数量,控制资源使用",
"default": 100
},
"ml_cache_timeout_hours": {
"description": "ML缓存超时(小时)",
"type": "int",
"hint": "机器学习分析结果的缓存时间",
"default": 1
}
}
},
"Persona_Backup_Settings": {
"description": "人格备份设置",
"type": "object",
"hint": "人格数据备份和恢复配置",
"items": {
"auto_backup_enabled": {
"description": "启用自动备份",
"type": "bool",
"hint": "是否在人格更新前自动创建备份",
"default": true
},
"backup_interval_hours": {
"description": "备份间隔(小时)",
"type": "int",
"hint": "自动备份的时间间隔",
"default": 24
},
"max_backups_per_group": {
"description": "每群最大备份数",
"type": "int",
"hint": "每个群保留的最大备份数量",
"default": 10
}
}
},
"Goal_Driven_Chat_Settings": {
"description": "目标驱动对话系统设置",
"type": "object",
"hint": "智能对话目标管理系统,支持动态目标检测和阶段规划",
"items": {
"enable_goal_driven_chat": {
"description": "启用目标驱动对话",
"type": "bool",
"hint": "是否启用智能对话目标系统。启用后会自动检测对话目标并动态调整回复策略",
"default": false
},
"goal_session_timeout_hours": {
"description": "会话超时时间(小时)",
"type": "int",
"hint": "对话目标会话的超时时间,超过该时间未活跃的会话将被自动清理",
"default": 24
},
"goal_auto_detect": {
"description": "自动检测对话目标",
"type": "bool",
"hint": "是否自动使用LLM分析用户消息检测对话目标类型。关闭后使用默认的闲聊模式",
"default": true
},
"goal_max_conversation_history": {
"description": "最大对话历史记录数",
"type": "int",
"hint": "保留在会话中的最大对话轮次(用户消息+Bot回复=1轮)。建议20-40轮",
"default": 40
}
}
},
"Affection_System_Settings": {
"description": "好感度系统设置",
"type": "object",
"hint": "用户好感度和bot情绪管理配置",
"items": {
"enable_affection_system": {
"description": "启用好感度系统",
"type": "bool",
"hint": "是否启用用户好感度和情绪响应系统",
"default": true
},
"max_total_affection": {
"description": "总好感度上限",
"type": "int",
"hint": "bot对所有用户的总好感度上限值",
"default": 250
},
"max_user_affection": {
"description": "单用户好感度上限",
"type": "int",
"hint": "单个用户可获得的最大好感度",
"default": 100
},
"affection_decay_rate": {
"description": "好感度衰减比例",
"type": "float",
"hint": "好感度重新分配时的衰减比例,0-1之间",
"default": 0.95
},
"daily_mood_change": {
"description": "启用每日情绪变化",
"type": "bool",
"hint": "是否每天随机更换bot的情绪状态",
"default": true
},
"mood_affect_affection": {
"description": "情绪影响好感度变化",
"type": "bool",
"hint": "当前情绪是否影响好感度变化幅度",
"default": true
}
}
},
"Mood_System_Settings": {
"description": "情绪系统设置",
"type": "object",
"hint": "bot情绪状态管理配置",
"items": {
"enable_daily_mood": {
"description": "启用每日情绪",
"type": "bool",
"hint": "是否启用每日随机情绪系统",
"default": true
},
"enable_startup_random_mood": {
"description": "启用启动时随机情绪",
"type": "bool",
"hint": "插件启动时是否为活跃群组设置随机初始情绪",
"default": true
},
"mood_change_hour": {
"description": "情绪更新时间",
"type": "int",
"hint": "每日更新情绪的小时(0-23)",
"default": 6
},
"mood_persistence_hours": {
"description": "情绪持续时间",
"type": "int",
"hint": "每次情绪状态持续的小时数",
"default": 24
}
}
},
"Social_Context_Settings": {
"description": "社交上下文注入设置",
"type": "object",
"hint": "控制向LLM prompt注入社交关系、好感度和情绪信息",
"items": {
"enable_social_context_injection": {
"description": "启用社交上下文注入",
"type": "bool",
"hint": "是否向LLM prompt中注入用户社交关系、好感度和情绪信息",
"default": true
},
"include_social_relations": {
"description": "注入用户社交关系",
"type": "bool",
"hint": "是否在prompt中包含用户的社交关系网络信息",
"default": true
},
"include_affection_info": {
"description": "注入好感度信息",
"type": "bool",
"hint": "是否在prompt中包含对该用户的好感度信息",
"default": true
},
"include_mood_info": {
"description": "注入Bot情绪信息",
"type": "bool",
"hint": "是否在prompt中包含Bot当前的情绪状态信息",
"default": true
},
"expression_patterns_hours": {
"description": "风格特征提取时间范围(小时)",
"type": "int",
"hint": "从多少小时内提取学到的表达风格特征注入到prompt中,默认24小时,可设置为7*24=168小时(一周)",
"default": 24
},
"context_injection_position": {
"description": "上下文注入位置",
"type": "string",
"hint": "社交上下文注入到prompt的位置,可选值:start(开头)、end(结尾)",
"default": "start"
}
}
},
"Storage_Settings": {
"description": "存储路径设置",
"type": "object",
"hint": "自定义插件数据存储位置",
"items": {
"data_dir": {
"description": "数据存储目录",
"type": "string",
"hint": "插件数据存储的根目录路径。默认位于 AstrBot 数据目录的 plugin_data/astrbot_plugin_self_learning 下;可以改为绝对路径",
"default": "./data/plugin_data/astrbot_plugin_self_learning"
}
}
},
"Database_Settings": {
"description": "数据库配置",
"type": "object",
"hint": "配置数据库类型和连接参数。默认使用 PostgreSQL;插件会尝试自动创建 PostgreSQL 数据库、schema 和 ORM 表。SQLite 和 MySQL 可作为显式配置的兼容后端。",
"items": {
"db_type": {
"description": "数据库类型",
"type": "string",
"hint": "填写 postgresql、pgsql、sqlite 或 mysql。默认使用 PostgreSQL,启动时会先建库和 schema,再同步 ORM 表;单机无 PostgreSQL 服务时可显式改为 sqlite",
"default": "postgresql"
},
"mysql_host": {
"description": "MySQL服务器地址",
"type": "string",
"hint": "MySQL服务器的IP地址或域名,如:localhost 或 192.168.1.100(仅当db_type为mysql时需要填写)",
"default": "localhost"
},
"mysql_port": {
"description": "MySQL端口",
"type": "int",
"hint": "MySQL服务器的端口号,通常为3306(仅当db_type为mysql时需要填写)",
"default": 3306
},
"mysql_user": {
"description": "MySQL用户名",
"type": "string",
"hint": "MySQL数据库的用户名,如:root 或 astrbot(仅当db_type为mysql时需要填写)",
"default": "root"
},
"mysql_password": {
"description": "MySQL密码",
"type": "string",
"hint": "MySQL数据库的密码(仅当db_type为mysql时需要填写)",
"default": ""
},
"mysql_database": {
"description": "MySQL数据库名",
"type": "string",
"hint": "MySQL数据库名称。使用MySQL 自动创建数据库以及数据库表",
"default": "astrbot_self_learning"
},
"postgresql_host": {
"description": "PostgreSQL服务器地址",
"type": "string",
"hint": "PostgreSQL服务器的IP地址或域名(仅当db_type为postgresql时需要填写)",
"default": "localhost"
},
"postgresql_port": {
"description": "PostgreSQL端口",
"type": "int",
"hint": "PostgreSQL服务器的端口号,通常为5432(仅当db_type为postgresql时需要填写)",
"default": 5432
},
"postgresql_user": {
"description": "PostgreSQL用户名",
"type": "string",
"hint": "PostgreSQL数据库的用户名,如:postgres 或 astrbot(仅当db_type为postgresql时需要填写)",
"default": "postgres"
},
"postgresql_password": {
"description": "PostgreSQL密码",
"type": "string",
"hint": "PostgreSQL数据库的密码(仅当db_type为postgresql时需要填写)",
"default": ""
},
"postgresql_database": {
"description": "PostgreSQL数据库名",
"type": "string",
"hint": "PostgreSQL数据库名称。插件会尝试自动创建数据库以及数据库表",
"default": "astrbot_self_learning"
},
"postgresql_schema": {
"description": "PostgreSQL Schema",
"type": "string",
"hint": "PostgreSQL schema 名称。默认 public;填写其他名称时插件会自动创建并使用该 schema",
"default": "public"
},
"max_connections": {
"description": "最大连接数",
"type": "int",
"hint": "数据库连接池的最大连接数,高并发场景可适当增加",
"default": 10
},
"min_connections": {
"description": "最小连接数",
"type": "int",
"hint": "数据库连接池的最小连接数,保持一定预热连接提高性能",
"default": 2
}
}
},
"API_Settings": {
"description": "外部API设置",
"type": "object",
"hint": "外部API接口的安全配置",
"items": {
"api_key": {
"description": "API访问密钥",
"type": "string",
"hint": "外部API接口的访问密钥。留空则不需要密钥认证。建议设置一个强密码保护API安全",
"default": ""
},
"enable_api_auth": {
"description": "启用API认证",
"type": "bool",
"hint": "是否启用API密钥认证。关闭后任何人都可以访问外部API接口",
"default": false
}
}
},
"Repository_Settings": {
"description": "数据访问层配置",
"type": "object",
"hint": "配置SQLAlchemy Repository数据访问的默认参数和限制",
"items": {
"default_review_limit": {
"description": "默认审查记录查询数量",
"type": "int",
"hint": "获取待审查的人格学习/风格学习记录时的默认数量限制",
"default": 50
},
"default_pattern_limit": {
"description": "默认表达模式查询数量",
"type": "int",
"hint": "获取表达模式时的默认数量限制",
"default": 10
},
"default_memory_limit": {
"description": "默认记忆查询数量",
"type": "int",
"hint": "获取记忆记录时的默认数量限制",
"default": 50
},
"default_affection_limit": {
"description": "默认好感度记录查询数量",
"type": "int",
"hint": "获取好感度交互记录时的默认数量限制",
"default": 50
},
"default_social_limit": {
"description": "默认社交记录查询数量",
"type": "int",
"hint": "获取社交关系记录时的默认数量限制",
"default": 50
},
"default_psychological_limit": {
"description": "默认心理状态记录查询数量",
"type": "int",
"hint": "获取心理状态记录时的默认数量限制",
"default": 20
},
"max_interaction_batch_size": {
"description": "最大交互批处理数量",
"type": "int",
"hint": "批量处理交互记录时的最大数量限制,避免单次处理过多数据",
"default": 100
},
"top_patterns_limit": {
"description": "顶级模式查询数量",
"type": "int",
"hint": "获取权重最高的表达模式时的默认数量限制",
"default": 10
},
"recent_interactions_limit": {
"description": "近期交互查询数量",
"type": "int",
"hint": "获取近期交互记录时的默认数量限制",
"default": 20
},
"trend_analysis_days": {
"description": "趋势分析天数",
"type": "int",
"hint": "进行趋势分析时默认查询的天数范围",
"default": 7
}
}
},
"Integration_Settings": {
"description": "功能融合",
"type": "object",
"hint": "与专门插件协同:记忆交给 LivingMemory,回复决策和生成交给 Group Chat Plus。本插件保留学习、审查、黑话、表达方式和上下文注入能力。",
"items": {
"delegate_memory_to_livingmemory": {
"description": "记忆委托给 LivingMemory",
"type": "bool",
"hint": "开启后,检测到 LivingMemory 插件已加载时,本插件不再写入或注入本地长期记忆,避免双重记忆系统互相污染。",
"default": true
},
"livingmemory_plugin_name": {
"description": "LivingMemory 插件名",
"type": "string",
"hint": "用于检测 LivingMemory 插件是否已加载。通常保持默认值即可。",
"default": "LivingMemory"
},
"disable_local_memory_when_delegated": {
"description": "委托时禁用本地记忆",
"type": "bool",
"hint": "开启后,只有检测到 LivingMemory 时才禁用本插件本地长期记忆;LivingMemory 未加载时自动保留本地降级能力。",
"default": true
},
"delegate_reply_to_group_chat_plus": {
"description": "回复交给 Group Chat Plus",
"type": "bool",
"hint": "开启后,检测到 Group Chat Plus 插件已加载时,本插件不再接管回复决策和回复生成,只负责学习上下文增强。",
"default": true
},
"group_chat_plus_plugin_name": {
"description": "Group Chat Plus 插件名",
"type": "string",
"hint": "用于检测 Group Chat Plus 插件是否已加载。通常保持默认值即可。",
"default": "astrbot_plugin_group_chat_plus"
},
"disable_local_reply_when_delegated": {
"description": "委托时禁用本地回复",
"type": "bool",
"hint": "开启后,只有检测到 Group Chat Plus 时才禁用本插件本地回复器;目标插件未加载时保留兼容降级。",
"default": true
}
}
},
"V2_Architecture_Settings": {
"description": "v2架构升级配置",
"type": "object",
"hint": "高级功能配置:Embedding向量化、Reranker重排序、知识引擎和记忆引擎。需要先在AstrBot中配置对应类型的Provider",
"items": {
"embedding_provider_id": {
"description": "Embedding 提供商 ID",
"type": "string",
"hint": "填写Embedding提供商的完整ID(如 'openai/text-embedding-3-large')。需要先在AstrBot的Provider管理中创建Embedding类型的提供商,然后将其ID填写到此处。格式通常为 '来源名/模型名'",
"default": "",
"_provider_type": "embedding"
},
"rerank_provider_id": {
"description": "Reranker 提供商 ID",
"type": "string",
"hint": "填写Reranker提供商的完整ID(如 'openai/qwen3-rerank')。需要先在AstrBot的Provider管理中创建Reranker类型的提供商,然后将其ID填写到此处。格式通常为 '来源名/模型名'",
"default": "",
"_provider_type": "rerank"
},
"rerank_top_k": {
"description": "重排序保留结果数",
"type": "int",
"hint": "Reranker重排序后保留的Top-K结果数量,值越小越精准但可能遗漏",
"default": 5
},
"rerank_min_candidates": {
"description": "触发重排序的最低候选文档数",
"type": "int",
"hint": "当知识+记忆候选文档数量低于此阈值时,跳过Reranker以节省延迟。设为0则始终执行重排序",
"default": 3
},
"provider_retry_interval_seconds": {
"description": "Provider 重试间隔(秒)",
"type": "float",
"hint": "AstrBot 冷启动时 Provider 注册表可能尚未就绪。插件会按此间隔重试绑定 Embedding/Reranker Provider。",
"default": 10.0
},
"knowledge_engine": {
"description": "知识引擎",
"type": "string",
"hint": "知识存储引擎类型。legacy=现有NetworkX实现,lightrag=使用LightRAG进行向量+图谱混合检索(需配置Embedding提供商)",
"default": "legacy"
},
"lightrag_query_mode": {
"description": "LightRAG 查询模式",
"type": "string",
"hint": "LightRAG检索模式。local=仅实体邻域检索(低延迟),hybrid=实体邻域+全局社区聚合(高质量但慢约4-5秒),naive=纯向量检索,global=仅全局社区,mix=混合模式",
"default": "local"
},
"memory_engine": {
"description": "记忆引擎",
"type": "string",
"hint": "记忆管理引擎类型。legacy=现有实现,mem0=使用mem0进行自动记忆提取和检索(需配置Embedding提供商)",
"default": "legacy"
}
}
}
}