Documentation ¶
Index ¶
- Constants
- Variables
- func AddApiKeyFlag(str *string, flags *pflag.FlagSet)
- func AddConfigFileFlag(str *string, flags *pflag.FlagSet)
- func AddImageModelFlag(str *string, flags *pflag.FlagSet)
- func AddImageOutputPrefixFlag(str *string, defaultName string, flags *pflag.FlagSet)
- func AddImageQualityFlag(str *string, flags *pflag.FlagSet)
- func AddImageSizeFlag(str *string, flags *pflag.FlagSet)
- func AddImageStyleFlag(str *string, flags *pflag.FlagSet)
- func AddInitialSystemMessageFlag(str *string, flags *pflag.FlagSet)
- func AddMaxTokensFlag(i *int, flags *pflag.FlagSet)
- func AddModelFlag(str *string, flags *pflag.FlagSet)
- func AddNumberImagesFlag(n *int, flags *pflag.FlagSet)
- func AddReplaySessionFileFlag(str *string, flags *pflag.FlagSet)
- func AddRoleFlag(str *string, flags *pflag.FlagSet)
- func AddSessionFileFlag(str *string, flags *pflag.FlagSet)
- func AddSkipWriteSessionFileFlag(b *bool, flags *pflag.FlagSet)
- func AddTemperatureFlag(f *float32, flags *pflag.FlagSet)
- func AddTopPFlag(f *float32, flags *pflag.FlagSet)
- func AddVerboseFlag(b *bool, flags *pflag.FlagSet)
- func NewChatCmd(rootFlags *RootFlags) *cobra.Command
- func NewImageCmd(rootFlags *RootFlags) *cobra.Command
- func NewListModelsCmd(rootFlags *RootFlags) *cobra.Command
- func NewReplaySessionCmd() *cobra.Command
- func NewRootCmd() *cobra.Command
- func NewVersionCmd() *cobra.Command
- type ChatContext
- type ChatFlags
- type ImageFlags
- type ReplaySessionFlags
- type RootFlags
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 ¶
View Source
var ( ErrorFmt = pterm.NewStyle(pterm.FgLightRed, pterm.Bold) HumanFmt = pterm.NewStyle(pterm.FgLightRed, pterm.Bold) AiFmt = pterm.NewStyle(pterm.FgLightGreen, pterm.Bold) TitleFmt = pterm.NewStyle(pterm.FgLightWhite, pterm.Bold) )
Functions ¶
func AddApiKeyFlag ¶ added in v1.3.0
func AddConfigFileFlag ¶ added in v1.3.0
AddConfigFileFlag initialises the ConfigFile flag.
func AddImageModelFlag ¶ added in v1.5.0
func AddImageOutputPrefixFlag ¶ added in v1.4.0
func AddImageQualityFlag ¶ added in v1.5.0
func AddImageSizeFlag ¶ added in v1.4.0
func AddImageStyleFlag ¶ added in v1.5.0
func AddInitialSystemMessageFlag ¶ added in v1.3.0
func AddMaxTokensFlag ¶ added in v1.3.0
func AddModelFlag ¶ added in v1.3.0
func AddNumberImagesFlag ¶ added in v1.4.0
func AddReplaySessionFileFlag ¶ added in v1.3.0
func AddRoleFlag ¶ added in v1.3.0
func AddSessionFileFlag ¶ added in v1.3.0
func AddSkipWriteSessionFileFlag ¶ added in v1.3.0
func AddTemperatureFlag ¶ added in v1.3.0
func AddTopPFlag ¶ added in v1.3.0
func AddVerboseFlag ¶ added in v1.3.0
func NewChatCmd ¶ added in v1.3.0
func NewImageCmd ¶ added in v1.4.0
func NewListModelsCmd ¶ added in v1.3.0
func NewReplaySessionCmd ¶ added in v1.3.0
func NewRootCmd ¶ added in v1.3.0
func NewVersionCmd ¶ added in v1.3.0
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
Click to show internal directories.
Click to hide internal directories.