config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigFilePath

func GetConfigFilePath(appName, configName string) string

Types

type Config

type Config struct {
	Version            string
	Debug              bool    `toml:"debug,omitempty"`
	MaxTokens          int     `toml:"max_tokens,omitempty"`
	Temperature        float32 `toml:"temperature,omitempty"`
	PromptTemplate     string  `toml:"prompt_template,omitempty"`
	Model              string  `toml:"model,omitempty"`
	APIKey             string  `toml:"api_key,omitempty"`
	Color              bool    `toml:"color,omitempty"`
	SystemMessage      string  `toml:"system_message,omitempty"`
	SystemMessageDebug string  `toml:"system_message_debug,omitempty"`
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig(configPath string) *Config

func (*Config) ConfigDialog added in v0.2.1

func (c *Config) ConfigDialog() error

func (*Config) GetSystemMessage

func (c *Config) GetSystemMessage() string

func (*Config) LoadConfig

func (c *Config) LoadConfig() error

func (*Config) SaveConfig

func (c *Config) SaveConfig() error

Jump to

Keyboard shortcuts

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