call

package
v0.0.0-...-849288d Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrHasNoFunctionCall       = irr.Error("has no function call")
	ErrToolNotFound            = irr.Error("tool not found")
	ErrParamsLenNotMet         = irr.Error("params length not met")
	ErrExecFailedInvalidParams = irr.Error("invalid params")
)

Functions

This section is empty.

Types

type Caller

type Caller struct {
	Prefix string
	Regex  *regexp.Regexp
}

func (*Caller) HasCall

func (ct *Caller) HasCall(content string) bool

func (*Caller) ParseCall

func (ct *Caller) ParseCall(ctx context.Context, content string) (name string, params []string, err error)

type Result

type Result struct {
	*Caller
	FunctionName       string   `json:"function_name,omitempty"`
	ParamValues        []string `json:"param_values,omitempty"`
	ExpectedParamNames []string `json:"expected_param_names,omitempty"`
	Response           any      `json:"response,omitempty"`
	Error              error    `json:"error,omitempty"`
}

func (*Result) ToPrompt

func (result *Result) ToPrompt() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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