Files
example-eino/pkg/model/tool.go
T

15 lines
459 B
Go

package model
// ToolDefinition 描述可供模型调用的工具。
type ToolDefinition struct {
Type string `json:"type"`
Function ToolFunctionDefinition `json:"function"`
}
// ToolFunctionDefinition 包含工具名称、用途和参数的 JSON Schema。
type ToolFunctionDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Parameters map[string]any `json:"parameters"`
}