* 执行完整的工具调用工作流
(
messages: any[],
availableTools: any[],
toolExecutor: (toolName: string, args: any) => Promise<any>,
options?: any
)
| 274 | * 执行完整的工具调用工作流 |
| 275 | */ |
| 276 | public async executeToolWorkflow( |
| 277 | messages: any[], |
| 278 | availableTools: any[], |
| 279 | toolExecutor: (toolName: string, args: any) => Promise<any>, |
| 280 | options?: any |
| 281 | ): Promise<any> { |
| 282 | this.ensureLLMAvailable(); |
| 283 | |
| 284 | if (this.llm instanceof QwenLLM) { |
| 285 | return await this.llm.executeToolWorkflow(messages, availableTools, toolExecutor, options); |
| 286 | } else { |
| 287 | throw new Error('工具调用工作流仅支持 Qwen 模型'); |
| 288 | } |
| 289 | } |
| 290 | |
| 291 | /** |
| 292 | * 获取状态信息 |
nothing calls this directly
no test coverage detected