Documentation ¶
Overview ¶
Package options print a list of global command-line options (applies to all commands).
Index ¶
Constants ¶
const ( FlagAIConfig = "config" FlagChatID = "chat-id" FlagLogFlushFrequency = "log-flush-frequency" )
Defines flag for ai cli.
const ( FlagDatastoreType = "datastore.type" FlagDatastoreUrl = "datastore.url" FlagDatastorePath = "datastore.path" FlagDatastoreUsername = "datastore.username" FlagDatastorePassword = "datastore.password" )
const ( FlagDefaultSystemPrompt = "system-prompt" FlagAiModel = "model" FlagAiToken = "token" FlagAiApiBase = "api-base" FlagAiTemperature = "temperature" FlagAiTopP = "top-p" FlagAiMaxTokens = "max-tokens" FlagOutputFormat = "output-format" FlagMultiContentEnabled = "multi-content-enabled" )
const (
// RecommendedEnvPrefix defines the ENV prefix used by all iam service.
RecommendedEnvPrefix = "AI"
)
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
LoadConfig reads in config file and ENV variables if set.
Types ¶
type Ai ¶ added in v0.1.3
type Ai struct { SystemPrompt string `yaml:"system-prompt,omitempty"` Token string `yaml:"token,omitempty"` Model string `yaml:"model,omitempty"` ApiBase string `yaml:"api-base,omitempty"` Temperature float64 `yaml:"temperature,omitempty"` TopP float64 `yaml:"top-p,omitempty"` MaxTokens int `yaml:"max-tokens,omitempty"` Proxy string `yaml:"proxy,omitempty"` OutputFormat OutputFormat `yaml:"output-format,omitempty"` MultiContentEnabled bool `yaml:"multi-content-enabled,omitempty"` }
type Config ¶
type Config struct { DefaultPromptMode string `yaml:"default-prompt-mode,omitempty"` ChatID string `yaml:"chat-id,omitempty"` Ai Ai `yaml:"ai"` DataStore DataStore `yaml:"datastore"` System *system.Analysis }
Config is a structure used to configure a AI. Its members are sorted roughly in order of importance for composers.
type ConfigFlags ¶
type ConfigFlags struct { Config *string SessionId *string // contains filtered or unexported fields }
ConfigFlags composes the set of values necessary for obtaining a REST client config.
func NewConfigFlags ¶
func NewConfigFlags(usePersistentConfig bool) *ConfigFlags
NewConfigFlags returns ConfigFlags with default values set.
func (*ConfigFlags) AddFlags ¶
func (f *ConfigFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds client configuration flags to a given flagset.
type DataStoreFlags ¶ added in v0.1.3
type DataStoreFlags struct { Type *string Url *string Path *string Username *string Password *string }
func NewDatastoreFlags ¶ added in v0.1.3
func NewDatastoreFlags(dsType string) *DataStoreFlags
NewDatastoreFlags returns DataStoreFlags with default values set.
func (*DataStoreFlags) AddFlags ¶ added in v0.1.3
func (d *DataStoreFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds client configuration flags to a given cmd.
func (*DataStoreFlags) Validate ¶ added in v0.1.3
func (d *DataStoreFlags) Validate() error
type ModelFlags ¶ added in v0.1.3
type ModelFlags struct { Token *string Model *string ApiBase *string Temperature *float64 TopP *float64 MaxTokens *int Proxy *string OutputFormat *string MultiContentEnabled *bool }
func NewModelFlags ¶ added in v0.1.3
func NewModelFlags() *ModelFlags
NewModelFlags returns ModelFlags with default values set.
func (*ModelFlags) AddFlags ¶ added in v0.1.3
func (m *ModelFlags) AddFlags(flags *pflag.FlagSet)
AddFlags binds client configuration flags to a given flagset.
func (*ModelFlags) Validate ¶ added in v0.1.3
func (m *ModelFlags) Validate() error
type OutputFormat ¶
type OutputFormat string
const ( RawOutputFormat OutputFormat = "raw" MarkdownOutputFormat OutputFormat = "markdown" )