command

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command string
const (
	Cancel    Command = "cancel"
	Confirm   Command = "confirm"
	Edit      Command = "edit"
	DoNothing Command = "do_nothing"
)

type FailbackCommandParser

type FailbackCommandParser[T any] struct {
	// contains filtered or unexported fields
}

func NewFailbackCommandParser

func NewFailbackCommandParser[T any](parsers ...Parser[T]) *FailbackCommandParser[T]

func (*FailbackCommandParser[T]) ParseCommand

func (p *FailbackCommandParser[T]) ParseCommand(ctx context.Context, req *types.ToolRequest[T]) (Command, error)

type LocalCommandParser

type LocalCommandParser[T any] struct {
	CancelKeywords  []string
	ConfirmKeywords []string
}

func NewLocalCommandParser

func NewLocalCommandParser[T any]() *LocalCommandParser[T]

func (*LocalCommandParser[T]) ParseCommand

func (p *LocalCommandParser[T]) ParseCommand(ctx context.Context, req *types.ToolRequest[T]) (Command, error)

type Parser

type Parser[T any] interface {
	ParseCommand(ctx context.Context, req *types.ToolRequest[T]) (Command, error)
}

type ToolBasedCommandParser

type ToolBasedCommandParser[T any] struct {
	// contains filtered or unexported fields
}

func NewToolBasedCommandParser

func NewToolBasedCommandParser[T any](chatModel model.ToolCallingChatModel) (*ToolBasedCommandParser[T], error)

func (*ToolBasedCommandParser[T]) ParseCommand

func (p *ToolBasedCommandParser[T]) ParseCommand(ctx context.Context, req *types.ToolRequest[T]) (Command, error)

Jump to

Keyboard shortcuts

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