Fix: show color; add bot [WIP]

This commit is contained in:
Grail Finder
2025-05-20 13:10:09 +03:00
parent 24f940f175
commit 2342c56aed
11 changed files with 267 additions and 36 deletions

View File

@ -12,6 +12,7 @@ type Config struct {
SessionLifetime int `toml:"SESSION_LIFETIME_SECONDS"`
DBURI string `toml:"DBURI"`
CookieSecret string `toml:"COOKIE_SECRET"`
LLMConfig LLMConfig `toml:"LLM"`
}
type ServerConfig struct {
@ -19,6 +20,11 @@ type ServerConfig struct {
Port string `toml:"PORT"`
}
type LLMConfig struct {
URL string `toml:"LLM_URL"`
TOKEN string `toml:"LLM_TOKEN"`
}
func LoadConfigOrDefault(fn string) *Config {
if fn == "" {
fn = "config.toml"