config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Server    ServerConfig    `yaml:"server"`
	Redis     RedisConfig     `yaml:"redis"`
	Providers ProvidersConfig `yaml:"providers"`
}

func Load

func Load(path string) (*Config, error)

Load loads configuration from file and environment variables.

type LLMConfig

type LLMConfig struct {
	Default    string            `yaml:"default"`
	ModelScope LLMProviderConfig `yaml:"modelscope"`
	OpenAI     LLMProviderConfig `yaml:"openai"`
}

type LLMProviderConfig

type LLMProviderConfig struct {
	BaseURL string `yaml:"base_url"`
	APIKey  string `yaml:"api_key"`
	Model   string `yaml:"model"`
}

type ProvidersConfig

type ProvidersConfig struct {
	LLM LLMConfig `yaml:"llm"`
}

type RedisConfig

type RedisConfig struct {
	URL string `yaml:"url"`
}

type ServerConfig

type ServerConfig struct {
	Addr string `yaml:"addr"`
}

Jump to

Keyboard shortcuts

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