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
Soulter
09c3da64f9
fix: Provider.meta() error ( #3647 )
...
fixes : #3643
2025-11-15 18:01:51 +08:00
Soulter
7d823af627
refactor: update provider metadata handling and enhance ProviderMetaData structure
2025-11-13 19:53:23 +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
Copilot
94bf3b8195
Fix incorrect type annotations and errors ( #3250 )
...
* Initial plan
* Fix type annotation errors in cmd_conf, cmd_init, and version_comparator
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Changes before error encountered
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Fix more type annotation errors: change `= None` to `| None = None`
Co-authored-by: LIghtJUNction <106986785+LIghtJUNction@users.noreply.github.com >
* Fix final batch of type annotation errors
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 >
Co-authored-by: LIghtJUNction <lightjunction.me@gmail.com >
2025-11-02 17:02:56 +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
Soulter
9430e3090d
feat: add progress callback for document upload and enhance upload progress tracking
2025-10-24 17:13:44 +08:00
Soulter
ba44f9117b
feat: enhance document upload process with batch settings and improved chunk handling
2025-10-24 16:37:37 +08:00
anka
5e9c7cdd91
fix: 当没有填写 api key 时,设置为空字符串 ( #2834 )
...
* fix: 修复空key导致的无法创建Provider对象的问题
* style: format code
* Update astrbot/core/provider/provider.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>
Co-authored-by: Soulter <905617992@qq.com >
2025-10-12 10:50:01 +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
9903b028a3
Feature: 支持配置重排序模型(vLLM API 格式)用于 score 任务 ( #2496 )
...
* feat: 支持添加重排序模型(vLLM API 格式)用于 score 任务
* fix: update rerank API base URL to use localhost
2025-08-19 16:15:31 +08:00
Soulter
1df49d1d6f
refactor: 重构 Function Tool 管理并初步引入 Multi Agent 及 Agent Handsoff 机制 ( #2454 )
...
* stage
* refactor: 重构 Function Tool 管理并引入 multi agent handsoff 机制
- Updated `star_request.py` to use the global `call_handler` instead of context-specific calls.
- Modified `entities.py` to remove the dependency on `FunctionToolManager` and streamline the function tool handling.
- Refactored `func_tool_manager.py` to simplify the `FunctionTool` class and its methods, removing deprecated code and enhancing clarity.
- Adjusted `provider.py` to align with the new function tool structure, removing unnecessary type unions.
- Enhanced `star_handler.py` to support agent registration and tool association, introducing `RegisteringAgent` for better encapsulation.
- Updated `star_manager.py` to handle tool registration for agents, ensuring proper binding of handlers.
- Revised `main.py` in the web searcher package to utilize the new agent registration system for web search tools.
* chore: websearch
* perf: 减少嵌套
* chore: 移除未使用的 mcp 导入
2025-08-17 10:57:25 +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
d8842ef274
perf: code quality
2025-07-13 17:27:40 +08:00
Ruochen
14564c392a
feat:meta方法增加provider_type字段
2025-07-08 15:33:02 +08:00
Soulter
5f0d601baa
feat: add support for selecting provider and models in webchat
2025-07-03 10:42:20 +08:00
Soulter
4e3d5641c8
chore: code quality
2025-06-29 15:51:56 +08:00
Soulter
20b760529e
fix: anthropic api error when using tools
2025-06-29 15:33:08 +08:00
Soulter
a55a07c5ff
remove: useless provider init params
2025-06-29 14:43:36 +08:00
Soulter
94ee8ea297
feat: 支持多轮次工具调用并且存储到数据库
...
移除了 llm tuner 适配器
2025-06-29 14:27:00 +08:00
Soulter
8288d5e51f
feat: embedding provider
2025-05-30 18:07:52 +08:00
Soulter
5c092321a6
feat: faiss vecdb implementation
...
remove: old knowledgedb deps
2025-05-23 13:16:24 +08:00
anka
ba252c5356
fix: 修正一个偶然发现的命名错误()
2025-04-06 08:12:00 +00:00
Soulter
109650faf3
✨ feat: 支持流式输出
2025-04-06 00:56:33 +08:00
Soulter
1aac8d8041
✨ feat: 适配完整的 function-calling 流程
2025-03-23 22:21:47 +08:00
Soulter
49bba9bf98
style: format codes
2025-03-03 13:30:55 +08:00
Soulter
2a614b545b
fix: 修复可能的 KeyError
2025-02-05 17:17:05 +08:00
Soulter
12f4e1146f
feat: 更好的对话管理
2025-02-05 13:26:53 +08:00
Soulter
aa8c56a688
fix: 相同type的provider共享了记忆
2025-02-02 19:13:47 +08:00
Soulter
637acd1a12
feat: 适配 OpenAI TTS API,并支持 Napcat,Gewechat,Lagrange 的语音输出
2025-01-25 19:46:00 +08:00
Soulter
cd8a73ed19
feat: 更好的人格情景管理和管理面板支持删除列表默认模版项
2025-01-14 21:08:57 +08:00
Soulter
be662b913c
feat: 支持 Whisper STT,并适配 Tencent 语音格式
2025-01-11 17:19:28 +08:00
Soulter
766f6a1ba2
perf: use request_llm
2024-12-21 16:35:16 +08:00
Soulter
c675017374
feat: 新增LLM请求事件钩子和装饰消息结果钩子
2024-12-19 21:33:03 +08:00
Soulter
3a67492680
perf: 插件报错直接终止事件;支持生成器发送信息
2024-12-14 20:11:28 +08:00
Soulter
85380ade6a
feat: 支持 llmtuner
...
perf: 优化流水线
2024-12-11 23:53:10 +08:00
Soulter
c6bdac8835
format: code lint
...
(ruff, uv 是个好东西)
2024-12-10 22:09:53 +08:00
Soulter
bdfc77d349
refactor: im so tired :)
2024-12-09 22:38:42 +08:00
Soulter
a01e865042
feat: 本地指标收集到数据库
2024-12-02 22:20:24 +08:00
Soulter
750a93a1aa
remove: 移除了 nakuru-project 库
...
但仍然使用其对 OneBot 的数据格式封装。
2024-12-02 19:31:33 +08:00
Soulter
6ab8114eee
feat: v3.4.0
2024-11-27 15:04:30 +08:00