main: 增强工具功能与消息处理
- 添加 `FileReadTool`,支持文件内容读取与安全验证 - 引入 `hasToolMessages` 逻辑,优化工具历史上下文处理 - 修改工具选项逻辑,支持禁用工具时的动态调整 - 增加消息序列化逻辑,优化 Redis 序列管理与数据同步 - 扩展测试覆盖,验证序列化与工具调用场景 - 增强 Docker Compose 脚本,支持应用重置与日志清理 - 调整工具调用超时设置,提升运行时用户体验
This commit is contained in:
@@ -5,6 +5,7 @@ namespace App\Services\Tool;
|
||||
use App\Services\Tool\Tools\BashTool;
|
||||
use App\Services\Tool\Tools\GetTimeTool;
|
||||
use App\Services\Tool\Tools\LsTool;
|
||||
use App\Services\Tool\Tools\FileReadTool;
|
||||
|
||||
/**
|
||||
* Tool 注册表:管理已注册工具与 OpenAI 兼容的声明。
|
||||
@@ -25,6 +26,7 @@ class ToolRegistry
|
||||
new GetTimeTool(),
|
||||
new LsTool(),
|
||||
new BashTool(),
|
||||
new FileReadTool(),
|
||||
];
|
||||
|
||||
$this->tools = [];
|
||||
|
||||
Reference in New Issue
Block a user