20 lines
588 B
Go
20 lines
588 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"`
|
|
}
|
|
|
|
// WeatherArguments 指定要查询当前天气的地点。
|
|
type WeatherArguments struct {
|
|
Location string `json:"location"`
|
|
}
|