Commit Graph

64 Commits

Author SHA1 Message Date
Windpicker-owo
3980509caa refactor(prompt): 重构并统一提示词系统
- 删除旧的智能提示词系统(smart_prompt.py)和相关参数模块(prompt_parameters.py)
- 将 prompt_builder.py 重命名为 prompt.py 并精简功能
- 更新所有模块的导入路径从 `src.chat.utils.prompt_builder` 到 `src.chat.utils.prompt`
- 统一提示词构建接口,使用新的 PromptContext 替代 SmartPromptParameters
- 移除重复和冗余代码,简化系统架构

BREAKING CHANGE: 旧的 SmartPrompt 系统已被完全移除,所有相关模块需要改用新的统一 Prompt 系统
2025-11-19 22:58:17 +08:00
Windpicker-owo
51aad4f952 迁移:1f91967(remove:移除willing系统,移除reply2,移除能量值,移除reply_to改为message) 2025-11-19 22:57:24 +08:00
Windpicker-owo
fe472dff60 修复代码格式和文件名大小写问题 2025-11-19 22:55:55 +08:00
minecraft1024a
ef630cd6c3 feat(expression): 重构表达学习配置,引入基于规则的结构化定义
本次更新旨在提高表达学习配置的可读性和灵活性。旧的基于列表的 `expression_learning` 和 `expression_groups` 配置方式难以理解且容易出错。

通过引入新的 `ExpressionRule` Pydantic模型,我们将所有相关设置(如聊天流ID、是否学习、学习强度、共享组等)整合到一个统一的、自描述的结构中。现在,所有规则都在一个新的 `[[expression.rules]]` 表中进行配置,使得逻辑更加清晰和易于维护。

相关模块,如 `ExpressionSelector`,已更新以适配新的配置结构。同时,数据库中的 `Expression` 模型也已更新为现代的 SQLAlchemy 2.0 风格。

BREAKING CHANGE: 表达学习的配置文件格式已完全改变。旧的 `expression_learning` 和 `expression_groups` 配置不再受支持,用户需要根据新的 `bot_config_template.toml` 文件迁移到 `[[expression.rules]]` 格式。
2025-11-19 22:48:53 +08:00
雅诺狐
ab3a36bfa7 全面更换orjson 2025-11-19 22:47:10 +08:00
雅诺狐
ced43386bf Refactor antiprompt flowchart and fix indentation
Updated the antipromptinjector flowchart for improved clarity and logic. Fixed indentation in expression_selector.py to correct code structure. Removed obsolete db_migration_plan.md documentation.
2025-11-19 22:43:44 +08:00
雅诺狐
875e02d42f 数据库重构 2025-11-19 22:40:23 +08:00
雅诺狐
23ee3767ef 初始化 2025-11-19 22:34:56 +08:00
UnCLAS-Prommer
1461338c0c typing fix 2025-08-13 22:51:34 +08:00
SengokuCola
4ffcc61f4b feat:记录使用的表达方式 2025-08-12 21:44:35 +08:00
UnCLAS-Prommer
fb63e4d696 typing fix 2025-08-12 17:03:34 +08:00
SengokuCola
f0fff5a039 fix:person创建和调用区分 2025-08-12 15:15:50 +08:00
SengokuCola
ae254de494 better:重构personinfo,使用Person类和类属性 2025-08-12 14:33:13 +08:00
SengokuCola
0f6ed0fe02 ref:重构关系系统第一步,拆除impression,采用不同属性交叉评分呢 2025-08-12 01:38:19 +08:00
SengokuCola
268b428e8f feat: llm统计现已记录模型反应时间 2025-08-11 21:51:59 +08:00
SengokuCola
849928a8f3 fix:优化表达方式提取 2025-08-11 20:41:25 +08:00
SengokuCola
bad2be2bdc fix:全面移除reply_to,并且非必须 2025-08-11 20:25:13 +08:00
SengokuCola
eeab546848 remove:移除grammar 2025-08-11 19:41:48 +08:00
SengokuCola
1f91967d2d remove:移除willing系统,移除reply2,移除能量值,移除reply_to改为message 2025-08-11 13:18:17 +08:00
SengokuCola
5220c269b6 fix:修复表达学习出错 2025-08-09 00:19:02 +08:00
SengokuCola
8053067af5 feat:优化关键词显示,优化表达方式配置和逻辑 2025-08-09 00:10:41 +08:00
SengokuCola
59ac6713b1 feat:移除willing_amlifier,简化活跃度配置 2025-08-08 22:54:40 +08:00
SengokuCola
721546fff9 fix:通过计时定位LLM异常延时,移除memory模型 2025-08-08 22:10:08 +08:00
SengokuCola
ade7ed4f5a fix:修复msg_id为正确提取导致的聊天退出错误 2025-08-07 23:48:04 +08:00
UnCLAS-Prommer
6c0edd0ad7 调整对应的调用 2025-07-30 17:07:55 +08:00
SengokuCola
3ab9b8def5 Update expression_learner.py 2025-07-26 23:18:21 +08:00
SengokuCola
0367dae824 fix:并行动作炸裂问题 2025-07-26 23:14:47 +08:00
SengokuCola
16e238a1c8 fix:修复一处关系构建错误,修复一处表达方式错误 2025-07-26 09:28:14 +08:00
SengokuCola
16b125b815 Update expression_learner.py 2025-07-24 22:16:21 +08:00
SengokuCola
b4a92ee5d5 feat:为表达添加创建时间 2025-07-24 00:36:53 +08:00
SengokuCola
8768b5d31b Merge branch 'dev' of https://github.com/MaiM-with-u/MaiBot into dev 2025-07-17 00:57:07 +08:00
SengokuCola
c12975bfdf fix:修正s4u的一些问题,修复表达方式共享失效的问题 2025-07-17 00:55:48 +08:00
UnCLAS-Prommer
1aa2734d62 typing fix 2025-07-17 00:10:41 +08:00
SengokuCola
399c8b1186 f r 2025-07-16 18:13:17 +08:00
SengokuCola
5c97bcf083 feat:更好的配置文件更新,表达方式迁移到数据库 2025-07-16 18:13:02 +08:00
UnCLAS-Prommer
d2ad6ea1d8 fix typo 2025-07-12 10:18:16 +08:00
UnCLAS-Prommer
485aaac783 Merge branch 'dev' into plugin 2025-07-12 10:02:05 +08:00
UnCLAS-Prommer
b303a95f61 部分类型注解修复,优化import顺序,删除无用API文件 2025-07-12 00:34:49 +08:00
github-actions[bot]
1bff478fcc 🤖 自动格式化代码 [skip ci] 2025-07-11 05:19:35 +00:00
SengokuCola
b3a93d16e6 fix - 优化normal_chat代码,采用和focus一致的关系构建,优化log,添加超时检查,允许normal使用llm激活 2025-07-06 17:02:36 +08:00
github-actions[bot]
e61e9c2590 🤖 自动格式化代码 [skip ci] 2025-07-03 07:21:00 +00:00
SengokuCola
5eab0c0e03 fix:修复rewrite的功能 2025-07-03 15:20:07 +08:00
github-actions[bot]
fbe8f08862 🤖 自动格式化代码 [skip ci] 2025-07-03 04:26:17 +00:00
SengokuCola
0b2bf81f75 remove & fix:移除人格表达,修复过滤词失效,私聊强制focus 2025-07-03 12:24:38 +08:00
github-actions[bot]
1c57e68f13 🤖 自动格式化代码 [skip ci] 2025-06-26 16:31:07 +00:00
SengokuCola
5f67774f6a better:优化表达选择 2025-06-27 00:30:13 +08:00
github-actions[bot]
70a92059e1 🤖 自动格式化代码 [skip ci] 2025-06-25 16:45:33 +00:00
SengokuCola
29a3183ba7 fix:修复表达提取无法提高count的问题 2025-06-26 00:44:51 +08:00
SengokuCola
f3f8efb07e fix:优化禁言插件,优化表达参数 2025-06-25 23:14:05 +08:00
SengokuCola
337e9cb9a4 fix:修复intwenti 2025-06-25 21:48:17 +08:00