config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(cfg *Config, path string) error

SaveConfig saves configuration to a YAML file

Types

type AgentConfig

type AgentConfig struct {
	Name     string         `yaml:"name"`
	Role     string         `yaml:"role"`
	Model    string         `yaml:"model"`
	Prompt   string         `yaml:"prompt"`
	Settings map[string]any `yaml:"settings"`
}

AgentConfig holds configuration for a single agent

type Config

type Config struct {
	// API Keys
	OpenAIKey      string `yaml:"openai_key"`
	AnthropicKey   string `yaml:"anthropic_key"`
	HuggingFaceKey string `yaml:"huggingface_key"`

	// GCP Configuration
	GCPProject     string `yaml:"gcp_project"`
	GCPCredentials string `yaml:"gcp_credentials"`

	// Model Configuration
	DefaultModel   string  `yaml:"default_model"`
	EmbeddingModel string  `yaml:"embedding_model"`
	MaxTokens      int     `yaml:"max_tokens"`
	Temperature    float64 `yaml:"temperature"`

	// Vector Store
	VectorProvider string            `yaml:"vector_provider"` // memory, firestore, pinecone
	VectorConfig   map[string]string `yaml:"vector_config"`

	// Agents Configuration
	Agents map[string]AgentConfig `yaml:"agents"`

	// Runtime Configuration
	Runtime RuntimeConfig `yaml:"runtime"`
}

Config represents the application configuration

func LoadConfig

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

LoadConfig loads configuration from a YAML file

func (*Config) Validate

func (c *Config) Validate() error

Validate checks if the configuration is valid

type RuntimeConfig

type RuntimeConfig struct {
	ChannelBufferSize  int  `yaml:"channel_buffer_size"`
	MaxConcurrentCalls int  `yaml:"max_concurrent_calls"`
	EnableMetrics      bool `yaml:"enable_metrics"`
}

RuntimeConfig holds runtime configuration

Jump to

Keyboard shortcuts

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