Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AutoTool = Tool{
Name: "auto",
}
AutoTool means the model can pick between generating a message or calling one or more tools
View Source
var ControlTools = []Tool{ NoTool, AutoTool, RequiredTool, }
View Source
var NoTool = Tool{
Name: "none",
}
NoTool means the model will not call any tool and instead generates a message
View Source
var RequiredTool = Tool{
Name: "required",
}
RequiredTool means the model must call one or more tools.
Functions ¶
This section is empty.
Types ¶
type Tool ¶
type Tool struct {
Name string
Description string
ArgumentSchema *schema.JSON
Callback func(jsonArg string) error
}
func NewTool ¶
func NewTool(name string, options ...ToolOption) Tool
type ToolOption ¶
func WithCallback ¶
func WithCallback(callback func(jsonArgument string) error) ToolOption
func WithDescription ¶
func WithDescription(description string) ToolOption
func WithSchema ¶
func WithSchema(arg any) ToolOption
Click to show internal directories.
Click to hide internal directories.