Documentation
¶
Overview ¶
Package tools contains the interfaces for pegwings-go tooling usable by llms.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FunctionCall ¶
type FunctionCall struct {
// Name is the name of the function call.
Name string `json:"name,omitempty"`
// Arguments is the arguments of the function call in JSON format.
Arguments string `json:"arguments,omitempty"`
}
FunctionCall represents a function call.
type FunctionDefinition ¶
type FunctionDefinition struct {
Name string `json:"name"`
Description string `json:"description"`
Parameters FunctionParameters `json:"parameters"`
}
FunctionDefinition represents the function definition.
type FunctionParameters ¶
type FunctionParameters struct {
Type string `json:"type"`
Properties map[string]PropertyDefinition `json:"properties"`
Required []string `json:"required"`
AdditionalProperties bool `json:"additionalProperties,omitempty"`
}
FunctionParameters represents the function parameters of a tool.
type PropertyDefinition ¶
type PropertyDefinition struct {
Type string `json:"type"`
Description string `json:"description"`
}
PropertyDefinition represents the property definition.
type Tool ¶
type Tool struct {
// Type is the type of the tool.
Type ToolType `json:"type"`
// Function is the tool's functional definition.
Function FunctionDefinition `json:"function,omitempty"`
}
Tool represents the tool.
type ToolCall ¶
type ToolCall struct {
// Index is not nil only in chat completion chunk object
Index *int `json:"index,omitempty"`
// ID is the id of the tool call.
ID string `json:"id"`
// Type is the type of the tool call.
Type string `json:"type"`
// Function is the function of the tool call.
Function FunctionCall `json:"function"`
}
ToolCall represents a tool call.
type ToolChoice ¶
type ToolChoice struct {
// Type is the type of the tool choice.
Type ToolType `json:"type"`
// Function is the function of the tool choice.
Function ToolFunction `json:"function,omitempty"`
}
ToolChoice represents the tool choice.
type ToolFunction ¶
type ToolFunction struct {
// Name is the name of the tool function.
Name string `json:"name"`
}
ToolFunction represents the tool function.
Click to show internal directories.
Click to hide internal directories.