config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 11, 2026 License: MIT Imports: 4 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     `toml:"server"`
	Memory     MemoryConfig     `toml:"memory"`
	Search     SearchConfig     `toml:"search"`
	Embeddings EmbeddingsConfig `toml:"embeddings"`
	Decay      DecayConfig      `toml:"decay"`
	Git        GitConfig        `toml:"git"`
	LLM        LLMConfig        `toml:"llm"`
}

Config holds all Yaad configuration.

func Default

func Default() *Config

func Load

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

type DecayConfig

type DecayConfig struct {
	Enabled       bool    `toml:"enabled"`
	HalfLifeDays  int     `toml:"half_life_days"`
	MinConfidence float64 `toml:"min_confidence"`
	BoostOnAccess float64 `toml:"boost_on_access"`
}

type EmbeddingsConfig

type EmbeddingsConfig struct {
	Enabled  bool   `toml:"enabled"`
	Provider string `toml:"provider"`
	Model    string `toml:"model"`
}

type GitConfig

type GitConfig struct {
	Watch     bool `toml:"watch"`
	AutoStale bool `toml:"auto_stale"`
}

type LLMConfig

type LLMConfig struct {
	Enabled   bool   `toml:"enabled"`
	Provider  string `toml:"provider"`
	Model     string `toml:"model"`
	APIKeyEnv string `toml:"api_key_env"`
}

LLMConfig is optional. Yaad is a memory layer — it does NOT call LLMs directly. This config is reserved for future summarization hooks.

type MemoryConfig

type MemoryConfig struct {
	HotTokenBudget  int `toml:"hot_token_budget"`
	WarmTokenBudget int `toml:"warm_token_budget"`
	MaxMemories     int `toml:"max_memories"`
}

type SearchConfig

type SearchConfig struct {
	BM25Weight   float64 `toml:"bm25_weight"`
	VectorWeight float64 `toml:"vector_weight"`
	DefaultLimit int     `toml:"default_limit"`
}

type ServerConfig

type ServerConfig struct {
	Port     int    `toml:"port"`
	Host     string `toml:"host"`
	TLS      bool   `toml:"tls"`
	CertFile string `toml:"cert_file"`
	KeyFile  string `toml:"key_file"`
}

Jump to

Keyboard shortcuts

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