cmd

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagApiKey               = "api-key"
	FlagConfigFile           = "config"
	FlagInitialSystemMessage = "system-message"
	FlagMaxTokens            = "max-tokens"
	FlagModel                = "model"
	FlagSkipWriteSessionFile = "skip-write-session"
	FlagRole                 = "role"
	FlagSessionFile          = "session-file"
	FlagTemperature          = "temperature"
	FlagTopP                 = "top-p"
	FlagVerbose              = "verbose"
	FlagImageSize            = "size"
	FlagNumberImages         = "number"
	FlagImageModel           = "model"
	FlagImageQuality         = "quality"
	FlagImageStyle           = "style"
	FlagOutputPrefix         = "output-prefix"
)

Variables

Functions

func AddApiKeyFlag added in v1.3.0

func AddApiKeyFlag(str *string, flags *pflag.FlagSet)

func AddConfigFileFlag added in v1.3.0

func AddConfigFileFlag(str *string, flags *pflag.FlagSet)

AddConfigFileFlag initialises the ConfigFile flag.

func AddImageModelFlag added in v1.5.0

func AddImageModelFlag(str *string, flags *pflag.FlagSet)

func AddImageOutputPrefixFlag added in v1.4.0

func AddImageOutputPrefixFlag(str *string, defaultName string, flags *pflag.FlagSet)

func AddImageQualityFlag added in v1.5.0

func AddImageQualityFlag(str *string, flags *pflag.FlagSet)

func AddImageSizeFlag added in v1.4.0

func AddImageSizeFlag(str *string, flags *pflag.FlagSet)

func AddImageStyleFlag added in v1.5.0

func AddImageStyleFlag(str *string, flags *pflag.FlagSet)

func AddInitialSystemMessageFlag added in v1.3.0

func AddInitialSystemMessageFlag(str *string, flags *pflag.FlagSet)

func AddMaxTokensFlag added in v1.3.0

func AddMaxTokensFlag(i *int, flags *pflag.FlagSet)

func AddModelFlag added in v1.3.0

func AddModelFlag(str *string, flags *pflag.FlagSet)

func AddNumberImagesFlag added in v1.4.0

func AddNumberImagesFlag(n *int, flags *pflag.FlagSet)

func AddReplaySessionFileFlag added in v1.3.0

func AddReplaySessionFileFlag(str *string, flags *pflag.FlagSet)

func AddRoleFlag added in v1.3.0

func AddRoleFlag(str *string, flags *pflag.FlagSet)

func AddSessionFileFlag added in v1.3.0

func AddSessionFileFlag(str *string, flags *pflag.FlagSet)

func AddSkipWriteSessionFileFlag added in v1.3.0

func AddSkipWriteSessionFileFlag(b *bool, flags *pflag.FlagSet)

func AddTemperatureFlag added in v1.3.0

func AddTemperatureFlag(f *float32, flags *pflag.FlagSet)

func AddTopPFlag added in v1.3.0

func AddTopPFlag(f *float32, flags *pflag.FlagSet)

func AddVerboseFlag added in v1.3.0

func AddVerboseFlag(b *bool, flags *pflag.FlagSet)

func NewChatCmd added in v1.3.0

func NewChatCmd(rootFlags *RootFlags) *cobra.Command

func NewImageCmd added in v1.4.0

func NewImageCmd(rootFlags *RootFlags) *cobra.Command

func NewListModelsCmd added in v1.3.0

func NewListModelsCmd(rootFlags *RootFlags) *cobra.Command

func NewReplaySessionCmd added in v1.3.0

func NewReplaySessionCmd() *cobra.Command

func NewRootCmd added in v1.3.0

func NewRootCmd() *cobra.Command

func NewVersionCmd added in v1.3.0

func NewVersionCmd() *cobra.Command

Types

type ChatContext added in v1.3.0

type ChatContext struct {
	InteractiveSession bool
}

func NewChatContext added in v1.3.0

func NewChatContext() *ChatContext

type ChatFlags added in v1.3.0

type ChatFlags struct {
	// contains filtered or unexported fields
}

func NewChatFlags added in v1.3.0

func NewChatFlags() *ChatFlags

type ImageFlags added in v1.4.0

type ImageFlags struct {
	Model             string
	Size              string
	Quality           string
	Style             string
	NumberImages      int
	OutputPrefix      string
	CurrentImageCount int
}

func NewImageFlags added in v1.4.0

func NewImageFlags() *ImageFlags

func (*ImageFlags) ValidateDalle2Flags added in v1.5.0

func (f *ImageFlags) ValidateDalle2Flags() error

func (*ImageFlags) ValidateDalle3Flags added in v1.5.0

func (f *ImageFlags) ValidateDalle3Flags() error

func (*ImageFlags) ValidateFlags added in v1.4.0

func (f *ImageFlags) ValidateFlags() error

type ReplaySessionFlags added in v1.3.0

type ReplaySessionFlags struct {
	// contains filtered or unexported fields
}

func NewReplaySessionFlags added in v1.3.0

func NewReplaySessionFlags() *ReplaySessionFlags

type RootFlags added in v1.3.0

type RootFlags struct {
	// contains filtered or unexported fields
}

func NewRootFlags added in v1.3.0

func NewRootFlags() *RootFlags

Jump to

Keyboard shortcuts

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