Commit Graph

28 Commits

Author SHA1 Message Date
liuwei
5eb1e3294f 优化ai_auto_response提示词与短回复策略:场景优先级、防冲突压缩、记忆相关性筛选、可配置长度限制
- 增加场景优先级规则,技术群优先结论与排查点,降低人设冲突\n- Dify 入参新增上下文压缩、画像与记忆去重、低相关记忆过滤\n- 回复后处理支持配置化长度阈值,并增加总字数上限裁剪\n- 新增 prompt_compact/reply 配置项,便于后续按群微调
2026-04-16 11:24:41 +08:00
liuwei
265f3835b4 已按你说的改成“命中即跳出 + 后台入队处理”,插件调度仍然是独占策略,没有做并行插件处理。
主要改动在 main.py:

process_message(...) 现在只做入队,立刻返回 True, "queued",主链路立即释放。
原来的完整处理逻辑迁到 _process_message_impl(...),由后台 worker 消费队列执行。
新增队列 worker 循环 _message_worker_loop(...),并在 start()/stop() 管理生命周期。
增加 _ensure_workers_started(),避免插件在无事件循环阶段 create_task 报错(延迟到有 loop 时启动)。
保留了之前的 LLM 防阻塞措施:to_thread + semaphore + timeout。
配置也加在 config.toml 的 [runtime]:

llm_max_concurrency = 3
llm_call_timeout_sec = 120
queue_worker_count = 2
queue_maxsize = 500
已做语法校验:py_compile 通过。
2026-04-15 10:23:05 +08:00
liuwei
5e80287530 切换到dify,还是不要直连,dify更方便 2026-04-10 16:41:14 +08:00
liuwei
a1aa05e3b9 feat(ai_auto_response): add admin-controlled persona switching 2026-04-10 13:15:35 +08:00
liuwei
c280fa8dab rebalance ai_auto_response participation tuning 2026-04-10 10:44:10 +08:00
liuwei
3f9ae6442d tighten ai_auto_response participation and spam guard 2026-04-10 09:56:34 +08:00
liuwei
d2856bee2e soften ai_auto_response group domain steering 2026-04-10 09:45:39 +08:00
liuwei
f580c69736 refactor ai_auto_response plugin architecture 2026-04-09 17:46:30 +08:00
liuwei
cc65378544 feat(ai_auto_response): handle image follow-up more safely 2026-04-09 10:06:39 +08:00
liuwei
aecb62cb4d refactor: centralize llm backend configuration 2026-04-08 13:43:41 +08:00
liuwei
fa98c9e6a5 tune xiaoniu config 2026-04-08 09:43:55 +08:00
liuwei
f4715f104a adjust xiaoniu runtime config 2026-04-08 09:38:21 +08:00
liuwei
3d56b3895a harden xiaoniu defenses and directed cooldowns 2026-04-07 17:26:13 +08:00
liuwei
96432039cc add retry for xiaoniu api requests 2026-04-07 16:17:58 +08:00
liuwei
271954cfbb adjust xiaoniu runtime config 2026-04-07 16:04:33 +08:00
liuwei
58faa4322c fix xiaoniu mention gating and vector memory config 2026-04-07 16:00:31 +08:00
liuwei
0ac08c45c0 tune xiaoniu address style by group 2026-04-07 15:38:52 +08:00
liuwei
5ca9a8d1d9 tune xiaoniu low-frequency social interjections 2026-04-07 14:52:38 +08:00
liuwei
42feb29a40 add dota2 match history boundary for xiaoniu 2026-04-07 14:12:48 +08:00
liuwei
daf5170008 tune xiaoniu mention reply behavior 2026-04-07 14:09:31 +08:00
liuwei
1996df7b99 add group-aware persona bias for xiaoniu bot 2026-04-07 12:10:47 +08:00
liuwei
8476149a2d tune xiaoniu reply brevity and flow thresholds 2026-04-07 11:36:02 +08:00
liuwei
d616846098 refactor ai_auto_response into xiaoniu group bot 2026-04-07 11:15:29 +08:00
liuwei
5be3be48bf 优化自动对话逻辑 2026-02-02 13:34:32 +08:00
liuwei
1de44bac44 优化关键词 2025-05-21 17:12:02 +08:00
liuwei
95db155077 调整自动回复逻辑 2025-05-21 16:24:49 +08:00
liuwei
4bdc04d2da 调整自动回复逻辑 2025-05-21 16:12:25 +08:00
liuwei
c1b9517990 添加新的插件。 2025-05-21 16:03:18 +08:00