builtin

package
v0.9.5-rc5 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SafeTools = map[string]struct{}{
	"sys.abort":                     {},
	"sys.chat.finish":               {},
	"sys.chat.history":              {},
	"sys.chat.current":              {},
	"sys.echo":                      {},
	"sys.prompt":                    {},
	"sys.time.now":                  {},
	"sys.context":                   {},
	"sys.model.provider.credential": {},
}

Functions

func Builtin

func Builtin(name string) (types.Tool, bool)

func DiscardProgress added in v0.8.4

func DiscardProgress() (progress chan<- string, closeFunc func())

func GetDefaultModel added in v0.1.4

func GetDefaultModel() string

func ListTools

func ListTools() (result []types.Tool)

func SetDefaultModel added in v0.1.4

func SetDefaultModel(model string)

func SetDefaults

func SetDefaults(tool types.Tool) types.Tool

func SysAbort

func SysAbort(_ context.Context, _ []string, input string, _ chan<- string) (string, error)

func SysAppend added in v0.1.4

func SysAppend(_ context.Context, _ []string, input string, _ chan<- string) (string, error)

func SysChatCurrent added in v0.9.0

func SysChatCurrent(ctx context.Context, _ []string, _ string, _ chan<- string) (string, error)

func SysChatFinish added in v0.6.0

func SysChatFinish(_ context.Context, _ []string, input string, _ chan<- string) (string, error)

func SysChatHistory added in v0.7.0

func SysChatHistory(ctx context.Context, _ []string, _ string, _ chan<- string) (string, error)

func SysContext added in v0.8.4

func SysContext(ctx context.Context, _ []string, _ string, _ chan<- string) (string, error)

func SysDownload

func SysDownload(_ context.Context, env []string, input string, _ chan<- string) (_ string, err error)

func SysExec

func SysExec(_ context.Context, env []string, input string, progress chan<- string) (string, error)

func SysFind

func SysFind(_ context.Context, _ []string, input string, _ chan<- string) (string, error)

func SysGetenv

func SysGetenv(_ context.Context, env []string, input string, _ chan<- string) (string, error)

func SysHTTPGet

func SysHTTPGet(_ context.Context, _ []string, input string, _ chan<- string) (_ string, err error)

func SysHTTPHtml2Text

func SysHTTPHtml2Text(ctx context.Context, env []string, input string, progress chan<- string) (string, error)

func SysHTTPPost

func SysHTTPPost(ctx context.Context, _ []string, input string, _ chan<- string) (_ string, err error)

func SysLs added in v0.4.2

func SysLs(_ context.Context, _ []string, input string, _ chan<- string) (string, error)

func SysModelProviderCredential added in v0.9.5

func SysModelProviderCredential(ctx context.Context, _ []string, _ string, _ chan<- string) (string, error)

func SysRead

func SysRead(_ context.Context, _ []string, input string, _ chan<- string) (string, error)

func SysRemove

func SysRemove(_ context.Context, _ []string, input string, _ chan<- string) (string, error)

func SysStat added in v0.1.4

func SysStat(_ context.Context, _ []string, input string, _ chan<- string) (string, error)

func SysTimeNow added in v0.7.0

func SysTimeNow(context.Context, []string, string, chan<- string) (string, error)

func SysWrite

func SysWrite(_ context.Context, _ []string, input string, _ chan<- string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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