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 `json:"name"`
Description string `json:"description"`
ArgumentSchema *schema.JSON `json:"argument_schema,omitempty"`
Function func(ctx context.Context, call Call) (string, error) `json:"-"`
}
func NewTool ¶
func NewTool(name string, options ...ToolOption) Tool
type ToolOption ¶
func WithArgSchema ¶ added in v0.1.0
func WithArgSchema(arg any) ToolOption
func WithDescription ¶
func WithDescription(description string) ToolOption
func WithFunction ¶ added in v0.2.0
func WithFunction(callback Function) ToolOption
Click to show internal directories.
Click to hide internal directories.