Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
ID string `toml:"id"`
Nick string `toml:"nick"`
Token string `toml:"token"`
ULR string `toml:"url"`
Src string `toml:"src"`
}
Bot contains base API configuration parameters.
type BuildInfo ¶ added in v0.2.0
type BuildInfo struct {
Name string
Hash string
Revision string
GoVersion string
Date string
URL string
}
BuildInfo is a build information.
type Config ¶
type Config struct {
sync.Mutex
M Main `toml:"main"`
B Bot `toml:"bot"`
G GPT `toml:"gpt"`
Y YandexGPT `toml:"yandex_gpt"`
L Log `toml:"log"`
Bt *botgolang.Bot
DB *sql.DB
BuildInfo *BuildInfo
RandSource rand.Source
// contains filtered or unexported fields
}
Config is common configuration struct.
type GPT ¶ added in v0.7.0
type GPT struct {
Bearer string `toml:"bearer"`
Organization string `toml:"organization"`
MaxTokens uint `toml:"max_tokens"`
URL string `toml:"url"`
Proxy string `toml:"proxy"`
Temperature float32 `toml:"temperature"`
Client *http.Client `toml:"-"`
}
GPT is a ChatGPT API configuration settings.
type Log ¶ added in v0.3.0
type Log struct {
PidFile string `toml:"pidfile"`
LogFile string `toml:"logfile"`
Output io.WriteCloser
}
Log is a logging configuration settings.
type Main ¶ added in v0.2.0
type Main struct {
Debug bool `toml:"debug"`
Storage string `toml:"storage"`
Timeout uint64 `toml:"timeout"`
Workers int `toml:"workers"`
SecureRandom bool `toml:"secure_random"`
}
Main is a basic configuration settings.
Click to show internal directories.
Click to hide internal directories.