Skip to main content
Version: 0.2.3

Advanced Configuration

This section covers advanced configuration options that go beyond the basic setup. These settings are configured by editing the configuration file directly.

Configuration File

All Sercha settings are stored in a TOML file at:

~/.sercha/config.toml

The file is created automatically when you first configure Sercha. You can edit it directly with any text editor.

Configuration Sections

The configuration file is organised into sections:

SectionDescriptionDocumentation
[search]Search mode selectionBasic Configuration
[embedding]Embedding provider settingsBasic Configuration
[llm]LLM provider settingsBasic Configuration
[vector_index]Vector storage settingsStorage Configuration
[scheduler]Background task schedulingScheduling
[pipeline]Document processing pipelinePipeline Configuration

Complete Example

Here's a fully configured config.toml showing all available options:

# Search Configuration
[search]
mode = "full" # text_only, hybrid, llm_assisted, full

# Embedding Provider (required for hybrid/full modes)
[embedding]
provider = "openai"
model = "text-embedding-3-small"
api_key = "sk-your-api-key"
# base_url = "http://localhost:11434" # For Ollama

# LLM Provider (required for llm_assisted/full modes)
[llm]
provider = "openai"
model = "gpt-4o-mini"
api_key = "sk-your-api-key"
# base_url = "http://localhost:11434" # For Ollama

# Vector Index Settings
[vector_index]
enabled = true
dimensions = 1536
precision = "float16" # float32, float16, int8

# Background Scheduler
[scheduler]
enabled = true

[scheduler.oauth_refresh]
enabled = true
interval = "45m"

[scheduler.document_sync]
enabled = true
interval = "1h"

# Document Processing Pipeline
[pipeline]
processors = ["chunker"]

[pipeline.chunker]
chunk_size = 1000
overlap = 200

Reloading Configuration

Configuration changes take effect:

  • Immediately when using CLI commands like sercha settings
  • On restart when editing config.toml directly

For changes to take effect without restarting, use the CLI commands or TUI settings panel.

Environment Variables

Some settings can be overridden with environment variables:

VariableDescription
SERCHA_CONFIGAlternative config file path
OPENAI_API_KEYOpenAI API key (fallback if not in config)
ANTHROPIC_API_KEYAnthropic API key (fallback if not in config)

Next Steps