Include chat, weather, image, travel, streaming ASR and text examples, shared model initialization, documentation, and existing tests. Co-authored-by: TRAE CLI <traecli@bytedance.com>
15 lines
459 B
Go
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"`
|
|
}
|