WintryWind
fd223bb259
fix: resolve unhandled UTC timezone offset for timestamps in conversation records ( #5580 )
...
* fix: resolve unhandled UTC timezone offset for timestamps in conversation records
* fix: standardize timezone imports
* fix: unify UTC datetime normalization in dashboard routes
---------
Co-authored-by: 邹永赫 <1259085392@qq.com >
2026-03-01 16:10:35 +09:00
Dt8333
7dd95d8a59
chore: auto ann fix by ruff ( #4903 )
...
* chore: auto fix by ruff
* refactor: 统一修正返回类型注解为 None/bool 以匹配实现
* refactor: 将 _get_next_page 改为异步并移除多余的请求错误抛出
* refactor: 将 get_client 的返回类型改为 object
* style: 为 LarkMessageEvent 的相关方法添加返回类型注解 None
---------
Co-authored-by: Soulter <37870767+Soulter@users.noreply.github.com >
2026-02-09 00:22:24 +08:00
Soulter
241f1c26d3
feat: context compress ( #4322 )
...
* feat: context compressor
Co-authored-by: kawayiYokami <289104862@qq.com >
* Add comprehensive tests for ContextManager and ContextTruncator
- Implemented a full test suite for ContextManager covering initialization, message processing, token-based compression, and error handling.
- Added tests for ContextTruncator focusing on message fixing, truncation by turns, dropping oldest turns, and halving.
- Ensured that both test suites validate edge cases and maintain expected behavior with various message types, including system and tool messages.
* feat: add MockProvider for LLM compression tests
* chore: remove lock
* ruff fix
* fix
* perf
* feat: enhance context compression with token tracking and logging
* feat: update logging for context compression trigger
* feat: implement context compression logic with dynamic threshold and token tracking
* fix: reorder import statements for consistency
* feat: add token_usage tracking to conversations and update related processing logic
---------
Co-authored-by: kawayiYokami <289104862@qq.com >
2026-01-05 17:26:10 +08:00
Soulter
50144ddcae
refactor: revise LLM message schema and fix the reload logic when using dataclass-based LLM Tool registration ( #3234 )
...
* refactor: llm message schema
* feat: implement MCPTool and local LLM tools with enhanced context handling
* refactor: reorganize imports and enhance docstrings for clarity
* refactor: enhance ContentPart validation and add message pair handling in ConversationManager
* chore: ruff format
* refactor: remove debug print statement from payloads in ProviderOpenAIOfficial
* Update astrbot/core/agent/tool.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update astrbot/core/agent/message.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update astrbot/core/agent/message.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update astrbot/core/agent/tool.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update astrbot/core/pipeline/process_stage/method/llm_request.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* Update astrbot/core/agent/message.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* refactor: enhance documentation and import mcp in tool.py; update call method return type
* fix: 修复以数据类的方式注册 tool 时的插件重载机制问题
* refactor: change role attributes to use Literal types for message segments
* fix: add support for 'decorator_handler' method in call_local_llm_tool
* fix: handle None prompt in text_chat method and ensure context is properly formatted
---------
Co-authored-by: LIghtJUNction <lightjunction.me@gmail.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-11-02 18:12:20 +08:00
LIghtJUNction
0b7fc29ac4
style: add ruff lint module of isort and pyupgrade, and some ruff check fix ( #3214 )
...
Co-authored-by: Dt8333 <25431943+Dt8333@users.noreply.github.com >
Co-authored-by: Soulter <905617992@qq.com >
2025-11-01 13:26:19 +08:00
lxfight
98a75e923d
feat: 集成知识库到核心生命周期和消息流水线
...
- 在 AstrBotCoreLifecycle 中初始化知识库管理器
- 将知识库注入器添加到消息处理上下文
- 在消息流水线中添加 KBEnhanceStage(知识库增强阶段)
- 实现会话删除时的知识库配置级联清理机制
- 添加会话管理器的回调注册机制,支持零侵入扩展
2025-10-19 18:41:34 +08:00
Soulter
c2a34475f1
feat: 支持删除指定会话以及部分会话管理优化 ( #2895 )
...
* feat: add toast notification system with snackbar component
* feat: add session deletion functionality
* feat: support batch operations for updating session persona, provider, LLM, and TTS statuses
fix : #2263
* feat: 修复对话状态关闭,删除对话管理库会导致对话无法恢复
fixes : #2309
2025-09-27 20:36:30 +08:00
Soulter
69aaf09ac8
chore: 修复当自动更新 webchat title 时,history 被重置的问题
2025-08-24 00:23:08 +08:00
Soulter
64bcbc9fc0
refactor: 重构 SharedPreference 类并采用数据库存储替换 json 存储 ( #2482 )
2025-08-18 19:12:26 +08:00
Soulter
842c3c8ea9
Refactor: using sqlmodel(sqlchemy+pydantic) as ORM framework and switch to async-based sqlite operation ( #2294 )
...
* stage
* stage
* refactor: using sqlchemy as ORM framework, switch to async-based sqlite operation
- using sqlmodel as ORM(based on sqlchemy and pydantic)
- add Persona, Preference, PlatformMessageHistory table
* fix: conversation
* fix: remove redundant explicit session.commit, and fix some type error
* fix: conversation context issue
* chore: remove comments
* chore: remove exclude_content param
2025-08-02 15:44:00 +08:00
Soulter
14e0aa3ec5
perf: history 和 persona 指令当对话不存在的时候自动创建
...
fixes : #1997
2025-07-03 15:40:00 +08:00
anka
d88420dd03
fix: 修改获取人类可读的上下文的逻辑, 区分函数调用(无contents)和一般消息
2025-04-07 17:55:12 +08:00
anka
1746684e52
perf: 修改部分注释
2025-03-26 23:52:03 +08:00
anka
9717a736b1
perf: 更新部分描述
2025-03-26 13:50:54 +08:00
anka
5c4326c302
perf: 部分详细注释, 符合PEP8标准
2025-03-25 20:53:23 +08:00
Soulter
49bba9bf98
style: format codes
2025-03-03 13:30:55 +08:00
Soulter
67095f97b1
🐛 fix: delete conversation
...
✨ feat: supports active reply whitelist
2025-02-14 01:43:52 +08:00
Soulter
12f4e1146f
feat: 更好的对话管理
2025-02-05 13:26:53 +08:00