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

cli

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: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() *cobra.Command

Types

type CacheOptions added in v0.1.4

type CacheOptions cache.Options

type DisplayOptions

type DisplayOptions monitor.Options

type Eval added in v0.4.0

type Eval struct {
	Tools          []string `usage:"Tools available to call"`
	MaxTokens      int      `usage:"Maximum number of tokens to output"`
	Model          string   `usage:"The model to use"`
	JSON           bool     `usage:"Output JSON"`
	Temperature    string   `usage:"Set the temperature, \"creativity\""`
	InternalPrompt *bool    `Usage:"Set to false to disable the internal prompt"`
	// contains filtered or unexported fields
}

func (*Eval) Run added in v0.4.0

func (e *Eval) Run(cmd *cobra.Command, args []string) error

type GPTScript

type GPTScript struct {
	CacheOptions
	OpenAIOptions
	DisplayOptions
	Color         *bool  `usage:"Use color in output (default true)" default:"true"`
	Confirm       bool   `usage:"Prompt before running potentially dangerous commands"`
	Debug         bool   `usage:"Enable debug logging"`
	Quiet         *bool  `usage:"No output logging (set --quiet=false to force on even when there is no TTY)" short:"q"`
	Output        string `usage:"Save output to a file, or - for stdout" short:"o"`
	Input         string `usage:"Read input from a file (\"-\" for stdin)" short:"f"`
	SubTool       string `usage:"Use tool of this name, not the first tool in file" local:"true"`
	Assemble      bool   `usage:"Assemble tool to a single artifact, saved to --output" hidden:"true" local:"true"`
	ListModels    bool   `usage:"List the models available and exit" local:"true"`
	ListTools     bool   `usage:"List built-in tools and exit" local:"true"`
	Server        bool   `usage:"Start server" local:"true"`
	ListenAddress string `usage:"Server listen address" default:"127.0.0.1:9090" local:"true"`
	Chdir         string `usage:"Change current working directory" short:"C"`
}

func (*GPTScript) Customize

func (r *GPTScript) Customize(cmd *cobra.Command)

func (*GPTScript) NewGPTScriptOpts added in v0.4.0

func (r *GPTScript) NewGPTScriptOpts() gptscript.Options

func (*GPTScript) NewRunContext added in v0.4.0

func (r *GPTScript) NewRunContext(cmd *cobra.Command) context.Context

func (*GPTScript) PersistentPre added in v0.4.0

func (r *GPTScript) PersistentPre(*cobra.Command, []string) error

func (*GPTScript) PrintOutput added in v0.4.0

func (r *GPTScript) PrintOutput(toolInput, toolOutput string) (err error)

func (*GPTScript) Run

func (r *GPTScript) Run(cmd *cobra.Command, args []string) error

type OpenAIOptions added in v0.1.4

type OpenAIOptions openai.Options

Jump to

Keyboard shortcuts

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