modelpicker

package
v1.58.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 11, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ToolNameChangeModel = "change_model"
	ToolNameRevertModel = "revert_model"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeModelArgs

type ChangeModelArgs struct {
	Model string `json:"model" jsonschema:"The model to switch to. Must be one of the available models."`
}

ChangeModelArgs are the arguments for the change_model tool.

type Tool

type Tool struct {
	// contains filtered or unexported fields
}

Tool provides tools for dynamically switching the agent's model mid-conversation.

func NewModelPickerTool

func NewModelPickerTool(models []string) *Tool

NewModelPickerTool creates a new Tool with the given list of allowed models.

func (*Tool) AllowedModels

func (t *Tool) AllowedModels() []string

AllowedModels returns the list of models this tool allows switching to.

func (*Tool) Instructions

func (t *Tool) Instructions() string

Instructions returns guidance for the LLM on when and how to use the model picker tools.

func (*Tool) Tools

func (t *Tool) Tools(context.Context) ([]tools.Tool, error)

Tools returns the change_model and revert_model tool definitions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL