Versions in this module Expand all Collapse all v0 v0.0.1 Jan 8, 2025 Changes in this version + func GetKey(profile string) (string, error) + func GetOrReadKey(profile string) (string, error) + func GetVersion(ctx context.Context) string + func IsDebug(ctx context.Context) bool + func LoadConfigFile(path string, config *ConfigFile, isGlobal bool) error + func NewContext(config *Config) context.Context + func ReadKey(profile string, force bool) (string, error) + func ReadKeyAndUpdate(profile string, force bool) (string, error) + type App struct + Clients []*ClientRef + Config *Config + func GetApp(ctx context.Context) *App + func NewApp(config *Config) *App + func (a *App) PrimaryClient() *ClientRef + type ClientRef struct + Client *openai.Client + Config *ConfigService + func NewClientRef(config *ConfigService) *ClientRef + func (c *ClientRef) Request(ctx context.Context, cb RequestCallback) error + type Config struct + Debug bool + Dir string + Services []*ConfigService + Version bool + func LoadConfig() (*Config, error) + type ConfigFile struct + Default *string + Profiles map[string]*ConfigFileProfile + type ConfigFileProfile struct + BaseURL string + CompactionToks int + Concurrency int + Context ConfigFileProfileContext + Key string + Model string + Preset *string + Prompt *ConfigFilePrompt + Retries int + type ConfigFileProfileContext struct + Dir string + IsGlobal bool + type ConfigFilePrompt struct + Content *string + Path *string + type ConfigService struct + BaseURL string + CompactionToks int + Concurrency int + Key ConfigValue[string] + Model string + Profile string + Prompt string + Retries int + type ConfigSource int + const CfConfigFile + const CfEnvironment + const CfKeyChain + const CfNone + type ConfigValue struct + Source ConfigSource + Value V + type ContextKey string + const CtxApp + const CtxVersion + type RequestCallback func(client *openai.Client) error