Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ErrToolCreation ¶
type ErrToolCreation struct {
Message string
}
func (ErrToolCreation) Error ¶
func (e ErrToolCreation) Error() string
type Tool ¶
type Tool struct {
Name string `json:"name"`
Description string `json:"description"`
Parameters *jsonschema.Schema `json:"parameters,omitempty"`
// contains filtered or unexported fields
}
func New ¶ added in v0.0.2
func New(name, description string, callable func(ctx context.Context) ([]types.Content, error)) Tool
Declare tool that does not require any arguments
func NewWithArgs ¶ added in v0.0.2
func NewWithArgs[T any](name, description string, callable ToolCallableTyped[T]) (Tool, error)
Declare a tool with required arguments Arguments `T` must be a struct type, otherwise an error is returned.
type ToolCallable ¶
type ToolCallableTyped ¶
Click to show internal directories.
Click to hide internal directories.