Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ConfigPath string `toml:"-"`
Key string `toml:"key"`
Endpoint string `toml:"endpoint"`
Version string `toml:"version"`
Model string `toml:"model"`
ModelCost ModelCost `toml:"modelCost"`
Target string `toml:"target"`
Output string `toml:"output"`
State string `toml:"state"`
Ignores []string `toml:"ignores"`
Prompt string `toml:"prompt"`
Type string `toml:"type"`
Collector StringOrSlice `toml:"collector"`
Previewer StringOrSlice `toml:"previewer"`
Glamour string `toml:"glamour"`
MaxTokens int `toml:"max_tokens"`
Opener string `toml:"opener"`
Sources []Source `toml:"sources"`
TmpReviewPath string `toml:"-"`
TmpPromptPath string `toml:"-"`
}
Config holds the configuration details for the application.
func NewConfig ¶
func NewConfig() Config
NewConfig initializes a new Config instance and populates it with values.
func (*Config) GetSourceFromName ¶ added in v0.2.0
func (*Config) GetSources ¶ added in v0.2.0
func (Config) ToStringArray ¶
ToStringArray converts the Config struct to a string array.
func (*Config) ToggleSourceEnabled ¶ added in v0.2.0
type ModelCost ¶ added in v0.2.0
type ModelCost struct {
Input, Output float64
}
ModelCost represents the cost associated with AI model usage.
type Source ¶ added in v0.2.0
type Source struct {
Name string `toml:"name"`
Collector StringOrSlice `toml:"collector"`
Previewer StringOrSlice `toml:"previewer"`
Prompt string `toml:"prompt"`
Enabled bool `toml:"enabled"`
}
func (Source) Description ¶ added in v0.2.0
func (Source) FilterValue ¶ added in v0.2.0
type StringOrSlice ¶ added in v0.2.0
type StringOrSlice []string
StringOrSlice is a custom type that can hold either a string or a slice of strings.
func (*StringOrSlice) UnmarshalTOML ¶ added in v0.2.0
func (s *StringOrSlice) UnmarshalTOML(data any) error
UnmarshalTOML decodes either a string or a slice of strings into a StringOrSlice.
func (*StringOrSlice) UnmarshalText ¶ added in v0.2.0
func (s *StringOrSlice) UnmarshalText(text []byte) error
UnmarshalText decodes a single string into a StringOrSlice.
Click to show internal directories.
Click to hide internal directories.