config

package
v0.0.0-...-c78db46 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 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 AgentConfig

type AgentConfig struct {
	Groq GroqConfig `yaml:"groq"`
}

type AuthConfig

type AuthConfig struct {
	AccessTokenSecretKey  string `json:"access_token_secret_key"`
	RefreshTokenSecretKey string `json:"refresh_token_secret_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 {
	Model  string `yaml:"model" validate:"required" default:"meta-llama/llama-4-scout-17b-16e-instruct"`
	APIKey string `yaml:"api_key" validate:"required"`
}

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