config

package
v0.0.0-beta.12 Latest Latest
Warning

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

Go to latest
Published: Mar 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 AzureConfig

type AzureConfig struct {
	Endpoint   string `mapstructure:"endpoint"`
	APIKey     string `mapstructure:"api_key"`
	APIVersion string `mapstructure:"api_version"`
	ChatModel  string `mapstructure:"chat_model"`
	EmbedModel string `mapstructure:"embed_model"`
}

type CommunityConfig

type CommunityConfig struct {
	MinCommunitySize int `mapstructure:"min_community_size"`
	MaxLevels        int `mapstructure:"max_levels"`
}

type Config

type Config struct {
	DataDir   string          `mapstructure:"data_dir"`
	LLM       LLMConfig       `mapstructure:"llm"`
	Indexing  IndexingConfig  `mapstructure:"indexing"`
	Community CommunityConfig `mapstructure:"community"`
	Server    ServerConfig    `mapstructure:"server"`
}

func Load

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

func (*Config) DBPath

func (c *Config) DBPath() string

type HuggingFaceConfig

type HuggingFaceConfig struct {
	BaseURL    string `mapstructure:"base_url"`
	APIKey     string `mapstructure:"api_key"`
	ChatModel  string `mapstructure:"chat_model"`
	EmbedModel string `mapstructure:"embed_model"`
}

type IndexingConfig

type IndexingConfig struct {
	ChunkSize     int  `mapstructure:"chunk_size"`
	ChunkOverlap  int  `mapstructure:"chunk_overlap"`
	BatchSize     int  `mapstructure:"batch_size"`
	Workers       int  `mapstructure:"workers"`
	ExtractGraph  bool `mapstructure:"extract_graph"`
	ExtractClaims bool `mapstructure:"extract_claims"`
}

type LLMConfig

type LLMConfig struct {
	Provider    string            `mapstructure:"provider"`
	Azure       AzureConfig       `mapstructure:"azure"`
	Ollama      OllamaConfig      `mapstructure:"ollama"`
	HuggingFace HuggingFaceConfig `mapstructure:"huggingface"`
}

type OllamaConfig

type OllamaConfig struct {
	BaseURL    string `mapstructure:"base_url"`
	ChatModel  string `mapstructure:"chat_model"`
	EmbedModel string `mapstructure:"embed_model"`
}

type ServerConfig

type ServerConfig struct {
	Host string `mapstructure:"host"`
	Port int    `mapstructure:"port"`
}

Jump to

Keyboard shortcuts

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