From f3b1cef2c1af34d45f968fdfd915946486e17398 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 16 Jul 2026 18:33:50 +0800 Subject: [PATCH] fix: change output channel tool type from 'output' to 'function' for LLM API compatibility --- internal/agent/core/agent.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/agent/core/agent.go b/internal/agent/core/agent.go index 0bfb738..d1e9797 100644 --- a/internal/agent/core/agent.go +++ b/internal/agent/core/agent.go @@ -2007,7 +2007,7 @@ func (a *Agent) buildToolDefs() []interface{} { } // 输出通道工具 — 每注册通道生成两个工具: - // output_send__{name} (type=output) — 向该通道发送内容 + // output_send__{name} (type=function) — 向该通道发送内容 // output_send__{name}_help (type=function) — 查看该通道的 JSON 格式说明 channels := a.io.ListChannels() for _, ch := range channels { @@ -2022,7 +2022,7 @@ func (a *Agent) buildToolDefs() []interface{} { // 输出门工具 tools = append(tools, map[string]interface{}{ - "type": "output", + "type": "function", "function": map[string]interface{}{ "name": "output_send__" + ch.Name, "description": desc + "。能力: " + capStr + "。content 参数为 JSON 字符串,具体格式请调用 output_send__" + ch.Name + "_help 查看。",