config

package
v0.0.0-...-32dd017 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(conf any, envPrefix string, configPaths []string) error

Load reads and parses the configuration file

Types

type AIMLAPIConfig

type AIMLAPIConfig struct {
	Enabled bool   `yaml:"enabled" default:"false"`
	Model   string `yaml:"model"`
	APIKey  string `yaml:"api_key"`
}

type AgentConfig

type AgentConfig struct {
	Groq       GroqConfig       `yaml:"groq"`
	OpenRouter OpenRouterConfig `yaml:"openrouter"`
	Baseten    BasetenConfig    `yaml:"baseten"`
	AIMLAPI    AIMLAPIConfig    `yaml:"aimlapi"`
}

type AuthConfig

type AuthConfig struct {
	AccessTokenSecretKey  string `json:"access_token_secret_key"`
	RefreshTokenSecretKey string `json:"refresh_token_secret_key"`
}

type BasetenConfig

type BasetenConfig struct {
	Enabled bool   `yaml:"enabled" default:"false"`
	Model   string `yaml:"model"`
	APIKey  string `yaml:"api_key"`
}

type Config

type Config struct {
	Log      logger.Config
	Ops      ops.Config
	DataDir  string `yaml:"data_dir" validate:"required" default:"./data"`
	Server   ServerConfig
	Telegram TelegramConfig
	Agent    AgentConfig `yaml:"agent"`
	STT      STTConfig   `yaml:"stt"`
	Timezone string      `yaml:"timezone" validate:"required" default:"UTC"`
}

type GroqConfig

type GroqConfig struct {
	Enabled bool   `yaml:"enabled" default:"false"`
	Model   string `yaml:"model" default:"meta-llama/llama-4-scout-17b-16e-instruct"`
	APIKey  string `yaml:"api_key"`
}

type OpenRouterConfig

type OpenRouterConfig struct {
	Enabled bool   `yaml:"enabled" default:"false"`
	Model   string `yaml:"model" default:"openai/gpt-4o-mini"`
	APIKey  string `yaml:"api_key"`
}

type STTConfig

type STTConfig struct {
	Enabled     bool   `yaml:"enabled" default:"false"`
	ModelPath   string `yaml:"model_path"`
	MaxDuration int    `yaml:"max_duration" default:"30"`
}

type ServerConfig

type ServerConfig struct {
	Addr           string     `yaml:"addr" validate:"required" default:":9000"`
	ReflectEnabled bool       `yaml:"reflect_enabled" default:"false"`
	Auth           AuthConfig `yaml:"auth"`
}

type TelegramConfig

type TelegramConfig struct {
	BotToken    string `yaml:"bot_token" validate:"required"`
	BotUsername string `yaml:"bot_username"`
}

Jump to

Keyboard shortcuts

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