Soulter
6849af2bad
refactor: LLM response handling with reasoning content ( #3632 )
...
* refactor: LLM response handling with reasoning content
- Added a `show_reasoning` parameter to `run_agent` to control the display of reasoning content.
- Updated `LLMResponse` to include a `reasoning_content` field for storing reasoning text.
- Modified `WebChatMessageEvent` to handle and send reasoning content in streaming responses.
- Implemented reasoning extraction in various provider sources (e.g., OpenAI, Gemini).
- Updated the chat interface to display reasoning content in a collapsible format.
- Removed the deprecated `thinking_filter` package and its associated logic.
- Updated localization files to include new reasoning-related strings.
* feat: add Groq chat completion provider and associated configurations
* Update astrbot/core/provider/sources/gemini_source.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-11-15 18:59:17 +08:00
Copilot
e190bbeeed
Optimize string concatenation in loops: replace += with list.join() ( #3246 )
...
* Initial plan
* Fix string concatenation performance issues in loops
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Address code review feedback: Fix plugin list logic and add comment
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Improve comment clarity for at_parts accumulation
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
2025-11-02 13:00:59 +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
Futureppo
40a0a8df5a
perf: 优化 /model 切换模型成功的提示 ( #3161 )
2025-10-28 09:05:42 +08:00
Soulter
8afefada0a
fix: image_caption btn
2025-10-21 11:07:39 +08:00
Soulter
2c5f68e696
refactor: 重构创建平台时的流程及一些 UI 优化 ( #3102 )
...
* refactor: 支持在平台直接选择配置文件
* add webchat
* feat: 支持新建平台时现场预览、创建和编辑配置文件
* fix: update configuration file descriptions and visibility based on updating mode
* perf: use incremental decoder
* perf: update descriptions
* fix: UI update issues in config file dialog
* fix: update UI elements for better readability and organization
* feat: enhance sidebar navigation with group feature and dynamic resizing
Co-authored-by: IGCrystal <3811541171@qq.com >
* refactor: persona selector
* perf: 修改部分默认行为
* fix: adjust ExtensionCard layout and improve responsiveness
* refactor: 配置文件绑定消息平台重构为消息平台绑定配文件
* style: add custom styling for v-select selection text
* fix: correct subtitle text in provider.json
* refactor: update conversation management terminology and improve session ID handling
* refactor: add Conversation ID localization and update table header reference
* Update astrbot/core/db/migration/migra_45_to_46.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
* style: format logger warning for better readability
* refactor: comment out WebChat configuration for future reference
---------
Co-authored-by: IGCrystal <3811541171@qq.com >
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-10-20 12:01:06 +08:00
Dt8333
361d78247b
fix(core): 修复人格预设对话的重复注入 ( #3088 )
...
备份Context避免供应商适配器移除Context内字段导致将预设会话存入历史。深拷贝人格预设会话防止运行时被意外修改。
#3063
2025-10-19 20:13:57 +08:00
Soulter
17df1692b9
fix: 修复 /alter_cmd reset scene <num> xxx 不可用的问题
2025-10-15 12:16:13 +08:00
Dt8333
6f73e5087d
feat(core): 在新对话中重用先前的对话人格设置 ( #3005 )
...
* feat(core): reuse persona conf in new conversation
#2985
* refactor(core): simplify persona retrieval logic
* style: code format
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-10-12 10:42:35 +08:00
Dt8333
12fc6f9d38
fix(LTM): fix LTM not removed when removing conversation ( #3002 )
...
#2983
2025-10-12 00:16:42 +08:00
Soulter
1dfc831938
fix: 修复 reset 没有清除群聊上下文感知数据的问题 ( #2954 )
2025-10-05 00:05:42 +08:00
Soulter
cef0c22f52
feat: update prompt prefix handling to support placeholder replacement
2025-10-02 14:20:52 +08:00
Soulter
13d3fc5cfe
fix: fix type checking error and op, deop, wl, dwl command
2025-10-02 00:18:12 +08:00
Soulter
afe007ca0b
refactor: 优化 packages/astrbot 内置插件的代码结构以提高可维护性和可读性 ( #2924 )
...
* refactor: code structure for improved readability and maintainability
* style: ruff format
* Update packages/astrbot/commands/provider.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Update packages/astrbot/commands/persona.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Update packages/astrbot/commands/llm.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* Update packages/astrbot/commands/conversation.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
* fix: improve error handling message formatting in key switching
* fix: update LLM command to use safe get for provider settings
* feat: implement ProcessLLMRequest class for handling LLM requests and persona injection
---------
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
2025-10-01 21:29:15 +08:00
Soulter
50f74f5ba2
fix: 修复"开启 TTS 时同时输出语音和文字内容"功能不可用的问题 ( #2900 )
...
fixes : #2844
2025-09-28 10:48:57 +08:00
anka
ccb380ce06
feat: 支持接入 Coze ( #2858 )
...
* feat: 适配 coze 供应商
1. 支持文件上传
2. 支持多模态
3. 支持流式传输
4. 支持 API 端的上下文保存历史记录
5. 支持类似 dify 的 forget 接口
* style: format code
* fix: type checking error
* fix: 修复:
1. 使用coze api端的上下文时, 现在不会重复传递上下文
2. 使用 AstrBot 的上下文时, 正确处理其中的图片信息
3. 上传图片时, 提供一个非持久化的缓存避免重复上传(在解析上下文并将文件转化为file_id传递给coze api时, 如果没有缓存会导致很多的网络资源浪费)
4. 修复reset等指令不能正确重置上下文的问题
* fix: 移除某些地方多余的针对 dify 的断言, 以兼容 Coze
* style: 修改配置项显示/webchat平台对于非预期的类型的处理
* fix: 让conversation_id放到请求中正确的位置
* refactor: extract coze api client
* refactor: improve image processing logic in ProviderCoze
* chore: remove file ext guessing
---------
Co-authored-by: Soulter <905617992@qq.com >
2025-09-27 14:23:29 +08:00
Soulter
09d1f96603
fix: 修复 /alter_cmd 指令无法控制指令组、子指令组和子指令组下子指令的问题 ( #2873 )
...
* fix: revert changes in command_group.py at 782c036 to fix command group permission check
* fix: 不传递 GroupCommand handler
* perf: alter_cmd 指令支持对子指令、指令组进行配置
* chore: remove test commands and subcommands from test_group
* chore: add cache for complete command names list in CommandFilter and CommandGroupFilter
---------
Co-authored-by: Dt8333 <25431943+Dt8333@users.noreply.github.com >
Co-authored-by: Soulter <905617992@qq.com >
2025-09-26 14:16:50 +08:00
Soulter
7a5bc51c11
fix: 识别引用消息的图片时优先使用默认图片转述提供商 ( #2836 )
...
* fix: 识别引用消息的图片时优先使用默认图片转述提供商
closes : #2821
* fix: 添加日志记录以处理未找到图片标题提供者的情况
* style: format code
2025-09-21 20:55:32 +08:00
anka
9d9917e45b
feat: 增加群名称识别到 system prompt, 并提供相应的配置 ( #2770 )
...
* feat🤖 : 增加群名称识别到system prompt, 并提供相应的配置
* feat: 优化实现方式, 重构AstrBotMessage, 向后兼容
* style: format
2025-09-16 10:23:08 +08:00
Soulter
7740e1e131
ci: add ci stage of code format checking ( #2750 )
...
* style: ruff format
* ci(dashboard-ci): ensure GitHub Release action only runs on push events
* ci(code-format): ruff format and ruff check
2025-09-14 18:05:58 +08:00
Soulter
e84a00d3a5
fix: 修复多配置文件配置的不同人格无法生效的问题 ( #2739 )
...
fixes : #2724
2025-09-14 14:09:46 +08:00
Dt8333
ea6f209557
fix: 修复LLM仍会调用已禁用的工具的问题 ( #2729 )
...
* fix: 修复LLM调用已禁用的工具
* feat: 修改工具禁用判断位置,提高效率
未设置可用工具时仍旧循环判断
设置可用工具后在获取工具时即判断
2025-09-12 21:36:10 +08:00
Soulter
35eda37e83
Merge remote-tracking branch 'origin/releases/v3.5.27'
2025-09-04 15:30:15 +08:00
Soulter
ba2ee1c0aa
fix: 初次下载 webui 构建文件时下载指定版本而非 latest
2025-09-04 13:27:55 +08:00
Soulter
4149549e42
fix: KeyError arprompt
2025-09-03 12:45:34 +08:00
Soulter
bea7bae674
fix: dict read
2025-09-03 00:56:41 +08:00
Soulter
8d4c176314
fix: correct image_caption logic and remove redundant config call
2025-09-03 00:31:18 +08:00
Soulter
64bcbc9fc0
refactor: 重构 SharedPreference 类并采用数据库存储替换 json 存储 ( #2482 )
2025-08-18 19:12:26 +08:00
Soulter
b711140f26
Feature: 优化 WebSearch 的爬取网页速度并且支持使用 Tavily 作为搜索引擎 ( #2427 )
...
* feat: 优化了 websearch 的速度;支持 Tavily 作为搜索引擎
* fix: 优化日志记录格式,修复搜索结果处理中的索引和内容显示问题
2025-08-14 10:52:35 +08:00
Soulter
1d766001bb
Feature: 增加图片转述提供商配置、支持用户自定义模型模态能力 ( #2422 )
...
* feat: 增加图片转述提供商配置、支持用户自定义模型模态能力
* fix: 修复 LLMRequestSubStage 中会话管理方法参数不一致的问题,简化方法调用
2025-08-13 19:11:17 +08:00
Soulter
0759a11a85
fix: 修复 stage 在不同 pipeline 中被重复使用的问题和 persona 相关问题
2025-08-13 13:13:04 +08:00
Soulter
369eab18ab
Refactor: 重构配置文件管理,以支持更灵活的、会话粒度的(基于 umo part)配置文件隔离 ( #2328 )
...
* refactor: 重构配置文件管理,以支持更灵活的、基于 umo part 的配置文件隔离
* Refactor: 重构配置前端页面,新增数个配置项 (#2331 )
* refactor: 重构配置前端页面,新增数个配置项
* feat: 完善多配置文件结构
* perf: 系统配置入口
* fix: normal config item list not display
* fix: 修复 axios 请求中的上下文引用问题
2025-08-13 09:18:49 +08:00
Soulter
0c6e526f94
fix: platform id
2025-08-04 13:10:37 +08:00
Soulter
b1e3018b6b
Improve: 引入全新的人格管理模式以及重构函数工具管理器 ( #2305 )
...
* feat: add persona management
* refactor: 重构函数工具管理器,引入 ToolSet,并让 Persona 支持绑定 Tools
* feat: 更新 Persona 工具选择逻辑,支持全选和指定工具的切换
* feat: 更新 BaseDatabase 中的 persona 方法返回类型,支持返回 None
2025-08-04 00:56:26 +08:00
Soulter
87f05fce66
Fix: 当多个相同消息平台实例部署时上下文可能混乱(共享) ( #2298 )
...
* perf: update astrbot event session format, using platfrom id to ensure uniqueness
fixes : #1000
* fix: 更新 MessageSession 类以使用 platform_id 作为唯一标识符,并调整相关方法以确保一致性
* fix: 更新 MessageSession 文档以明确 platform_id 的赋值规则,并调整 get_platform 和 get_platform_inst 方法的返回类型
2025-08-02 21:38:55 +08:00
Raven95676
74a5c01f21
refactor: remove code and documentation references related to gewechat
2025-07-26 14:19:17 +08:00
Soulter
d7fd616470
style: code quality
2025-07-21 17:04:29 +08:00
Soulter
af295da871
chore: remove /mcp command
2025-07-13 17:11:02 +08:00
Soulter
0ee1eb2f9f
chore: remove useless file
2025-07-13 16:30:00 +08:00
Gao Jinzhe
6cabf07bc0
Merge branch 'AstrBotDevs:master' into Astrbot_session_manage
2025-07-13 00:23:29 +08:00
advent259141
a15444ee8c
移除了mcp会话级的启停,增加了批量设置的选项,对相关问题进行了修复
2025-07-13 00:15:21 +08:00
Soulter
ceb5f5669e
fix: update active reply bot prefix in logging for clarity
2025-07-13 00:12:31 +08:00
Raven95676
4dace7c5d8
chore: format code
2025-07-11 11:23:53 +08:00
Gao Jinzhe
0f692b1608
Merge branch 'master' into Astrbot_session_manage
2025-07-09 10:13:51 +08:00
Soulter
22364ef7de
feat: 支持对引用消息中的图片内容进行理解
...
fixes : #2056
2025-07-08 22:08:40 +08:00
Soulter
ab599dceed
Merge branch 'master' into deprecate/register_star-decorator
2025-07-08 11:52:33 +08:00
JOJO
ff63134c14
fix: 增加演示模式下校验插件开启/关闭/安装指令
2025-07-05 12:43:19 +08:00
Raven95676
edbb856023
refactor: deprecate register_star decorator
2025-07-04 15:54:23 +08:00
Soulter
14e0aa3ec5
perf: history 和 persona 指令当对话不存在的时候自动创建
...
fixes : #1997
2025-07-03 15:40:00 +08:00
advent259141
f536f24833
astrbot/core/pipeline/process_stage/method/llm_request.py
...
astrbot/core/pipeline/result_decorate/stage.py
astrbot/core/star/session_llm_manager.py
astrbot/core/star/session_tts_manager.py
astrbot/dashboard/routes/session_management.py
astrbot/dashboard/server.py
dashboard/src/views/SessionManagementPage.vue
packages/astrbot/main.py
2025-06-27 17:08:05 +08:00