pub struct SeekrConfig {
pub index_dir: PathBuf,
pub model_dir: PathBuf,
pub embed_model: String,
pub exclude_patterns: Vec<String>,
pub max_file_size: u64,
pub server: ServerConfig,
pub search: SearchConfig,
pub embedding: EmbeddingConfig,
}Expand description
Main configuration structure for Seekr.
Fields§
§index_dir: PathBufDirectory for storing index files.
Default: ~/.seekr/indexes/
model_dir: PathBufDirectory for storing downloaded ONNX models.
Default: ~/.seekr/models/
embed_model: StringEmbedding model name. Default: “all-MiniLM-L6-v2”
exclude_patterns: Vec<String>File glob patterns to exclude from scanning.
max_file_size: u64Maximum file size (in bytes) to index.
server: ServerConfigServer configuration.
search: SearchConfigSearch configuration.
embedding: EmbeddingConfigEmbedding configuration.
Implementations§
Source§impl SeekrConfig
impl SeekrConfig
Sourcepub fn load() -> Result<Self, ConfigError>
pub fn load() -> Result<Self, ConfigError>
Load configuration from the default config file path.
If the config file does not exist, returns default configuration and creates the default config file.
Sourcepub fn load_from(path: &Path) -> Result<Self, ConfigError>
pub fn load_from(path: &Path) -> Result<Self, ConfigError>
Load configuration from a specific file path.
Sourcepub fn save_to(&self, path: &Path) -> Result<(), ConfigError>
pub fn save_to(&self, path: &Path) -> Result<(), ConfigError>
Save configuration to a specific file path.
Sourcepub fn project_index_dir(&self, project_path: &Path) -> PathBuf
pub fn project_index_dir(&self, project_path: &Path) -> PathBuf
Get the index directory for a specific project path.
Each project gets its own isolated index directory based on a blake3 hash of the canonical project path.
Trait Implementations§
Source§impl Clone for SeekrConfig
impl Clone for SeekrConfig
Source§fn clone(&self) -> SeekrConfig
fn clone(&self) -> SeekrConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more