Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DefaultDataDir is the default directory name for vecgrep data DefaultDataDir = ".vecgrep" // DefaultDBFile is the default database filename DefaultDBFile = "vecgrep.db" // DefaultConfigFile is the default config filename DefaultConfigFile = "config.yaml" )
Variables ¶
This section is empty.
Functions ¶
func GetProjectRoot ¶
GetProjectRoot finds the project root by looking for .vecgrep directory
Types ¶
type Config ¶
type Config struct {
// DataDir is the directory where vecgrep stores its data
DataDir string `mapstructure:"data_dir"`
// DBPath is the path to the SQLite database file
DBPath string `mapstructure:"db_path"`
// Embedding configuration
Embedding EmbeddingConfig `mapstructure:"embedding"`
// Indexing configuration
Indexing IndexingConfig `mapstructure:"indexing"`
// Server configuration
Server ServerConfig `mapstructure:"server"`
}
Config holds the application configuration
func (*Config) EnsureDataDir ¶
EnsureDataDir creates the data directory if it doesn't exist
func (*Config) WriteDefaultConfig ¶
WriteDefaultConfig writes the default config file to the data directory
type EmbeddingConfig ¶
type EmbeddingConfig struct {
// Provider is the embedding provider: "ollama", "openai", "local"
Provider string `mapstructure:"provider"`
// Model is the embedding model name
Model string `mapstructure:"model"`
// OllamaURL is the Ollama API URL
OllamaURL string `mapstructure:"ollama_url"`
// Dimensions is the embedding vector dimensions
Dimensions int `mapstructure:"dimensions"`
}
EmbeddingConfig holds embedding provider settings
type IndexingConfig ¶
type IndexingConfig struct {
// ChunkSize is the target chunk size in tokens
ChunkSize int `mapstructure:"chunk_size"`
// ChunkOverlap is the overlap between chunks in tokens
ChunkOverlap int `mapstructure:"chunk_overlap"`
// IgnorePatterns are glob patterns to ignore during indexing
IgnorePatterns []string `mapstructure:"ignore_patterns"`
// MaxFileSize is the maximum file size to index in bytes
MaxFileSize int64 `mapstructure:"max_file_size"`
}
IndexingConfig holds indexing settings
type ServerConfig ¶
type ServerConfig struct {
// Host is the server bind address
Host string `mapstructure:"host"`
// Port is the server port
Port int `mapstructure:"port"`
// MCPEnabled enables the MCP server
MCPEnabled bool `mapstructure:"mcp_enabled"`
}
ServerConfig holds server settings
Click to show internal directories.
Click to hide internal directories.