config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 5 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"`
	Storage   StorageConfig   `yaml:"storage"`
	Embedding EmbeddingConfig `yaml:"embedding"`
}

func Load

func Load() (*Config, error)

func LoadFromPath

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

type CustomEmbedConfig

type CustomEmbedConfig struct {
	BaseURL string            `yaml:"base_url"` // Required. e.g. https://openrouter.ai/api/v1
	APIKey  string            `yaml:"api_key"`
	Model   string            `yaml:"model"`   // Required. e.g. openai/text-embedding-3-small
	Dims    int               `yaml:"dims"`    // Required. Must match model output dimensions
	Headers map[string]string `yaml:"headers"` // Optional extra HTTP headers
}

type EmbeddingConfig

type EmbeddingConfig struct {
	Provider string            `yaml:"provider"` // openai | gemini | ollama | custom
	OpenAI   OpenAIEmbedConfig `yaml:"openai"`
	Gemini   GeminiEmbedConfig `yaml:"gemini"`
	Ollama   OllamaEmbedConfig `yaml:"ollama"`
	Custom   CustomEmbedConfig `yaml:"custom"`
}

type GeminiEmbedConfig

type GeminiEmbedConfig struct {
	APIKey string `yaml:"api_key"`
	Model  string `yaml:"model"`
}

type OllamaEmbedConfig

type OllamaEmbedConfig struct {
	BaseURL string `yaml:"base_url"`
	Model   string `yaml:"model"`
	Dims    int    `yaml:"dims"`
}

type OpenAIEmbedConfig

type OpenAIEmbedConfig struct {
	APIKey  string `yaml:"api_key"`
	Model   string `yaml:"model"`
	BaseURL string `yaml:"base_url"` // Custom base URL for OpenAI-compatible APIs (Voyage, Together, Azure, etc.)
}

type PgvectorConfig

type PgvectorConfig struct {
	DSN              string `yaml:"dsn"`
	TableName        string `yaml:"table_name"`
	VectorDimensions int    `yaml:"vector_dimensions"`
}

type ServerConfig

type ServerConfig struct {
	Transport string `yaml:"transport"` // stdio | http
}

type StorageConfig

type StorageConfig struct {
	Backend  string         `yaml:"backend"` // pgvector | sqlite
	Pgvector PgvectorConfig `yaml:"pgvector"`
}

Jump to

Keyboard shortcuts

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