Help us shape the future of Go! Take the 2026 Go Developer Survey

builtin

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func Builtin

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

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) (string, error)

func SysAppend added in v0.1.4

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

func SysChatFinish added in v0.6.0

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

func SysChatHistory added in v0.7.0

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

func SysDownload

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

func SysExec

func SysExec(_ context.Context, env []string, input string) (string, error)

func SysFind

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

func SysGetenv

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

func SysHTTPGet

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

func SysHTTPHtml2Text

func SysHTTPHtml2Text(ctx context.Context, env []string, input string) (string, error)

func SysHTTPPost

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

func SysLs added in v0.4.2

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

func SysProgram

func SysProgram() *types.Program

func SysRead

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

func SysRemove

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

func SysStat added in v0.1.4

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

func SysTimeNow added in v0.7.0

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

func SysWrite

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

Types

type ErrChatFinish added in v0.6.0

type ErrChatFinish struct {
	Message string
}

func (*ErrChatFinish) Error added in v0.6.0

func (e *ErrChatFinish) Error() string

Jump to

Keyboard shortcuts

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