Files
correx/docs/sample-config.toml
T
kami d68c76ee3c feat: switchable router embedder and L3 backends via config
Adds [router.embedder] and [router.l3] sections to CorrexConfig with
backend selectors. Ships LlamaCppEmbedder that hits llama.cpp's
/embedding endpoint (handles OpenAI-compatible, simple, and array
response shapes; validates dimension). InfrastructureModule gains
createEmbedderFromConfig and createL3MemoryStoreFromConfig that
dispatch on backend value.

Defaults preserve current behavior (noop embedder + in-memory L3).
Switching to "llamacpp" / "turbovec" is a config-only change — no code
edits required. For turbovec backend, the bundled python sidecar
script is extracted from classpath to ~/.cache/correx/ on first use.
2026-05-30 01:23:14 +04:00

68 lines
1.6 KiB
TOML

# CORREX Configuration Sample
# Place at ~/.config/correx/config.toml
[server]
host = "localhost"
port = 8080
[tui]
theme = "dark"
session_list_limit = 5
[cli]
default_output = "human"
[approval]
timeout_ms = 300000
[tools]
sandbox_root = "~/.config/correx/sandbox"
working_dir = "/tmp"
default_system_prompt_path = "~/.config/correx/prompts/default_system.md"
[tools.shell]
enabled = true
allowed_executables = ["bash", "sh", "python3", "node"]
[tools.file_read]
enabled = true
[tools.file_write]
enabled = true
[tools.file_edit]
enabled = true
# Provider configuration (array of tables)
[[providers]]
id = "local-llama"
type = "llamacpp"
model_id = "mistral-7b"
model_path = "~/models/mistral-7b-gguf/model.gguf"
url = "http://127.0.0.1:10000"
capabilities = { General = 1.0, Coding = 0.7, Reasoning = 0.6, Summarization = 0.8, ToolCalling = 0.5 }
# Example: second provider (if you have multiple)
# [[providers]]
# id = "alternative-llama"
# type = "llamacpp"
# model_id = "neural-chat-7b"
# model_path = "~/models/neural-chat-7b-gguf/model.gguf"
# url = "http://127.0.0.1:10001"
# capabilities = { General = 0.9, Coding = 0.8, Reasoning = 0.7, Summarization = 0.75, ToolCalling = 0.6 }
# Router configuration (optional, defaults shown below)
[router.embedder]
backend = "noop" # or "llamacpp"
dimension = 1536
# url = "http://127.0.0.1:11000"
# model_id = "nomic-embed-text"
[router.l3]
backend = "in_memory" # or "turbovec"
# persist_path = "~/.config/correx/router/l3/index.tq"
# python_executable = "python3"
# script_path = "~/.config/correx/python/turbovec_sidecar.py"
# dim = 1536
# bit_width = 4