Add environment field to BackendSettings for improved configuration

This commit is contained in:
2025-09-28 13:31:26 +02:00
parent 7994fd05b3
commit 50e1355205

View File

@@ -13,9 +13,10 @@ import (
// BackendSettings contains structured backend configuration // BackendSettings contains structured backend configuration
type BackendSettings struct { type BackendSettings struct {
Command string `yaml:"command"` Command string `yaml:"command"`
Args []string `yaml:"args"` Args []string `yaml:"args"`
Docker *DockerSettings `yaml:"docker,omitempty"` Environment map[string]string `yaml:"environment,omitempty"`
Docker *DockerSettings `yaml:"docker,omitempty"`
} }
// DockerSettings contains Docker-specific configuration // DockerSettings contains Docker-specific configuration
@@ -135,8 +136,9 @@ func LoadConfig(configPath string) (AppConfig, error) {
}, },
Backends: BackendConfig{ Backends: BackendConfig{
LlamaCpp: BackendSettings{ LlamaCpp: BackendSettings{
Command: "llama-server", Command: "llama-server",
Args: []string{}, Args: []string{},
Environment: map[string]string{},
Docker: &DockerSettings{ Docker: &DockerSettings{
Enabled: false, Enabled: false,
Image: "ghcr.io/ggml-org/llama.cpp:server", Image: "ghcr.io/ggml-org/llama.cpp:server",