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

gptscript

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: Apache-2.0 Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GPTScript

type GPTScript struct {
	Registry *llm.Registry
	Runner   *runner.Runner
}

func New

func New(opts *Options) (*GPTScript, error)

func (*GPTScript) Close

func (g *GPTScript) Close()

func (*GPTScript) GetModel

func (g *GPTScript) GetModel() engine.Model

func (*GPTScript) ListModels

func (g *GPTScript) ListModels(ctx context.Context, providers ...string) ([]string, error)

func (*GPTScript) ListTools added in v0.4.0

func (g *GPTScript) ListTools(_ context.Context, prg types.Program) []types.Tool

func (*GPTScript) Run

func (g *GPTScript) Run(ctx context.Context, prg types.Program, envs []string, input string) (string, error)

type Options

type Options struct {
	Cache   cache.Options
	OpenAI  openai.Options
	Monitor monitor.Options
	Runner  runner.Options
	Quiet   *bool    `usage:"No output logging (set --quiet=false to force on even when there is no TTY)" short:"q"`
	Env     []string `usage:"-"`
}

Jump to

Keyboard shortcuts

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