package tool import ( "github.com/gogf/gf/v2/frame/g" ) // ToolListReq 工具列表查询请求 type ToolListReq struct { g.Meta `path:"/list" method:"get" tags:"工具管理" summary:"工具列表" dc:"查询已注册的模型工具列表"` } // ToolVO 工具对外信息 type ToolVO struct { Name string `json:"name"` Description string `json:"description"` } // ToolListRes 工具列表查询响应 type ToolListRes struct { List []*ToolVO `json:"list"` } // ToolAgentReq 工具对话请求:前端用户提问,模型通过 function calling 使用全部已注册模型工具作答 type ToolAgentReq struct { g.Meta `path:"/agent" method:"post" tags:"工具管理" summary:"工具对话" dc:"用户提问,模型通过 function calling 使用全部已注册模型工具作答"` Question string `json:"question" dc:"用户提问"` ModelId int64 `json:"modelId,string" dc:"模型ID"` SessionId string `json:"sessionId" dc:"会话ID,透传给网关记账"` SystemPrompt string `json:"systemPrompt" dc:"系统提示词,为空使用默认"` } // ToolAgentRes 工具对话响应 type ToolAgentRes struct { Answer string `json:"answer"` }