toolkit

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Callable

type Callable interface {
	Executable
	Definable
}

type Definable

type Definable interface {
	Definition() openai.FunctionDefinition
}

type Executable

type Executable interface {
	Execute() string
}

type Parsable

type Parsable interface {
	ParseArgument(rawArgs string) error
}

type Tool

type Tool[TArgs any] interface {
	GetArguments() TArgs
	ParseArgument(rawArgs string) error
}

type ToolArgs

type ToolArgs[TArgs any] struct {
	// contains filtered or unexported fields
}

func (*ToolArgs[TArgs]) GetArguments

func (t *ToolArgs[TArgs]) GetArguments() TArgs

func (*ToolArgs[TArgs]) ParseArgument

func (t *ToolArgs[TArgs]) ParseArgument(rawArgs string) error

type Toolkit

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

func NewToolkit

func NewToolkit() *Toolkit

func (*Toolkit) DefaultSystemMessage added in v0.1.1

func (t *Toolkit) DefaultSystemMessage() string

func (*Toolkit) GetTool

func (t *Toolkit) GetTool(name string) (Callable, bool)

func (*Toolkit) GetTools

func (t *Toolkit) GetTools() []openai.Tool

func (*Toolkit) RegisterTool

func (t *Toolkit) RegisterTool(tool Callable, tools ...Callable)

Jump to

Keyboard shortcuts

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