雅诺狐
48ed62deae
Refactor cache L2 storage to use SQLAlchemy DB
...
Replaces the L2 cache layer's SQLite implementation with an async SQLAlchemy-based database model (CacheEntries). Updates cache_manager.py to use db_query and db_save for cache operations, adds semantic cache handling with ChromaDB, and introduces async cache clearing and expiration cleaning methods. Adds the CacheEntries model and integrates it into the database API.
2025-11-19 22:43:59 +08:00
雅诺狐
16da725272
Add LLM anti-prompt injection system
...
Introduces a comprehensive anti-prompt injection system for LLMs, including rule-based and LLM-based detection, user ban/whitelist management, message shielding, and statistics tracking. Adds new modules under src/chat/antipromptinjector, integrates anti-injection checks into the message receive flow, updates configuration and database models, and provides test scripts. Also updates templates and logger aliases to support the new system.
2025-11-19 22:43:57 +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
minecraft1024a
27c63380c2
refactor(core): 调整数据库初始化时机
...
将数据库的初始化、表结构创建和自动迁移逻辑从配置文件加载时移动到主程序 `raw_main` 函数中。
这一改动旨在解决循环导入问题,并确保数据库在所有配置和核心模块加载完毕后才进行初始化,提高了程序的启动鲁棒性和模块独立性。
2025-11-19 22:43:17 +08:00
minecraft1024a
0144321254
refactor(db): 使用迁移函数替代 create_all 初始化数据库
...
将数据库初始化过程从直接调用 `Base.metadata.create_all` 修改为调用新的 `check_and_migrate_database` 函数。
这一更改旨在实现更灵活的数据库模式管理,允许在不丢失现有数据的情况下,自动检查并添加新的列或表,从而增强了数据库迁移的健壮性。
2025-11-19 22:43:14 +08:00
Furina-1013-create
8902f6b7cb
增加videoid修复同一个视频重复识别的问题
...
ps:通过数据库检查的去重:
视频hash计算:使用SHA256算法计算视频文件的唯一标识
数据库去重检查:在分析前先检查数据库中是否已存在相同hash的视频
结果缓存:将分析结果存储到Videos表中,避免重复分析
2025-11-19 22:42:45 +08:00
雅诺狐
875e02d42f
数据库重构
2025-11-19 22:40:23 +08:00
雅诺狐
dfecccfc56
llm统计记录模型反应时间
2025-11-19 22:40:11 +08:00
雅诺狐
bd1b9b279d
添加Unix socket连接方法
2025-11-19 22:39:19 +08:00
minecraft1024a
3af3904070
添加日程管理相关模型Schedule和MaiZoneScheduleStatus,并在调度管理器中实现日程处理状态的检查与更新逻辑,优化了基于日程的发送功能。
2025-11-19 22:39:13 +08:00
雅诺狐
2e6ae2419b
优化项目结构,格式化代码
2025-11-19 22:35:40 +08:00
minecraft1024a
c62e6642f7
feat: 添加日程管理功能,包括日程模型、配置和初始化逻辑,增强聊天回复中对当前活动的动态反馈。
2025-11-19 22:35:28 +08:00
雅诺狐
23ee3767ef
初始化
2025-11-19 22:34:56 +08:00
SengokuCola
fed0c0fd04
feat:更新记忆系统
2025-08-13 23:17:28 +08:00
SengokuCola
4ffcc61f4b
feat:记录使用的表达方式
2025-08-12 21:44:35 +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
c5cc1f8770
feat: 暂时禁用group_info
2025-08-11 22:53:00 +08:00
SengokuCola
268b428e8f
feat: llm统计现已记录模型反应时间
2025-08-11 21:51:59 +08:00
SengokuCola
6f49b3d99d
修复Action没有reply_to_message的问题
2025-08-11 14:55:23 +08:00
SengokuCola
3804124df8
fix:优化reply,填补缺失值,youhualog
2025-08-11 00:19:31 +08:00
SengokuCola
69a855df8d
feat:保存关键词到message数据库
2025-08-10 21:12:49 +08:00
SengokuCola
a2c86f3605
feat:部分处理notify,自动同步数据库null约束变更
...
notify存储至message库
2025-08-08 12:34:21 +08:00
墨梓柒
fa9cd653fe
Revert "feat(database): 添加MySQL支持并重构数据库配置"
2025-08-07 12:04:51 +08:00
cuckoo711
939f17890a
refactor(database): 重构数据库初始化和字段检查逻辑
...
- 添加对 MySQL 数据库的支持
- 优化字段检查和添加逻辑,处理 NOT NULL 字段和默认值
- 改进错误处理和日志记录
- 调整表和字段操作的 SQL 语句以适应不同数据库类型
2025-08-07 11:22:01 +08:00
cuckoo711
b6f5831785
feat(database): 添加MySQL支持并重构数据库配置
...
- 新增DataBaseConfig类用于集中管理数据库配置
- 重构数据库初始化逻辑,支持SQLite和MySQL两种数据库类型
- 为数据库表添加表前缀支持,便于多实例部署
- 更新数据库模型字段类型和长度限制
- 在配置模板中添加数据库配置节
2025-08-07 10:55:48 +08:00
UnCLAS-Prommer
1e5db5d7e1
正确使用lpmm构建prompt
2025-08-03 19:52:31 +08:00
SengokuCola
a02ea61386
fix ruff
2025-07-24 05:00:30 +08:00
SengokuCola
b4a92ee5d5
feat:为表达添加创建时间
2025-07-24 00:36:53 +08:00
UnCLAS-Prommer
f2c901bc98
typing
2025-07-20 18:14:53 +08:00
UnCLAS-Prommer
1aa2734d62
typing fix
2025-07-17 00:10:41 +08:00
SengokuCola
5c97bcf083
feat:更好的配置文件更新,表达方式迁移到数据库
2025-07-16 18:13:02 +08:00
SengokuCola
4aff3c8005
feat:测试性的新辅助记忆系统
2025-07-16 16:11:56 +08:00
SengokuCola
a150aa7b2b
feat:noreply不考虑command
2025-07-15 21:37:32 +08:00
SengokuCola
5ec0d42cde
feat:添加新的message类为s4u服务,添加s4u config,添加sc和gift的解析,修复关系构建的一些问题
2025-07-15 17:04:30 +08:00
UnCLAS-Prommer
f890722c3d
Merge branch 'dev' into plugin
2025-07-13 01:28:48 +08:00
UnCLAS-Prommer
7ef0bfb7c8
完成所有类型注解的修复
2025-07-13 00:19:54 +08:00
SengokuCola
a0efb89d98
feat:将normal抽象为循环
2025-07-11 21:51:47 +08:00
SengokuCola
375f28242a
fix:优化no——reply计算
2025-07-11 11:44:13 +08:00
SengokuCola
f17f5cf46c
feat:修改log,优化关系构建逻辑,节省token,
2025-07-08 02:04:31 +08:00
github-actions[bot]
324b294b5f
🤖 自动格式化代码 [skip ci]
2025-07-01 11:33:16 +00:00
SengokuCola
9b3251f8ec
feat:增加了reply_to新message属性,优化prompt,切割
2025-07-01 15:22:04 +08:00
github-actions[bot]
5757fef0f5
🤖 自动格式化代码 [skip ci]
2025-06-22 09:19:09 +00:00
SengokuCola
ce50f59c0a
fix:统计和person_info现已成为异步,巨爽
2025-06-22 17:13:43 +08:00
SengokuCola
248161a754
feat:添加熟悉度和关系值
2025-06-21 16:22:29 +08:00
UnCLAS-Prommer
661fe60cf7
fix #1034
2025-06-15 00:55:43 +08:00
SengokuCola
751a46da7b
feat:为normal加入了关系的构建和使用
2025-06-14 21:17:35 +08:00
github-actions[bot]
e744de2178
🤖 自动格式化代码 [skip ci]
2025-06-14 11:21:15 +00:00
SengokuCola
790642afd6
fix:修复发送api打字时间,现已成为可选参数。修复可能存在的回复图片问题,为数据库缺失字段提供警告
2025-06-14 19:21:02 +08:00
SengokuCola
e4e14550c7
修复sql小问题
2025-06-14 17:19:20 +08:00