371e0df340
The router/narration model behaviour was hardcoded (Main built RouterConfig() with defaults). Surface it under the [router] section so it's tunable without a rebuild: [router] conversation_keep_last, retrieval_k, token_budget [router.generation] temperature, top_p, max_tokens (chat/steering) [router.narration] temperature, top_p, max_tokens, max_per_run ConfigLoader parses the new sections (adds asDouble); Main maps the config-layer RouterConfig onto the domain RouterConfig and threads narration.max_per_run into ServerModule. All values default to the previous constants, so behaviour is unchanged when the sections are absent. Documents the block in sample-config.toml and adds parser tests for present/absent cases.
120 lines
4.5 KiB
TOML
120 lines
4.5 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"
|
|
|
|
[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
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Managed model configuration (Slice 1: correx spawns + owns llama-server)
|
|
#
|
|
# When [[models]] is present, correx launches llama-server at boot and kills it on
|
|
# shutdown. Use this instead of (or alongside) [[providers]].
|
|
#
|
|
# [models] — global settings for the managed llama-server process
|
|
# [[models]] — one entry per model file; correx will load the defaultModel at startup.
|
|
# ─────────────────────────────────────────────────────────────
|
|
[models]
|
|
default_model = "mistral-7b" # which [[models]] entry to load at boot
|
|
llama_server_bin = "llama-server" # path to the llama-server binary (default: llama-server)
|
|
host = "127.0.0.1" # host for llama-server to bind / correx to connect
|
|
port = 10000 # port for llama-server
|
|
|
|
[[models]]
|
|
id = "mistral-7b"
|
|
model_path = "~/models/mistral-7b-gguf/model.gguf"
|
|
context_size = 8192
|
|
capabilities = { General = 1.0, Coding = 0.7, Reasoning = 0.6, Summarization = 0.8, ToolCalling = 0.5 }
|
|
|
|
# Example: additional model (swap via TUI in a later slice)
|
|
# [[models]]
|
|
# id = "codellama-7b"
|
|
# model_path = "~/models/codellama-7b-gguf/model.gguf"
|
|
# context_size = 4096
|
|
# capabilities = { General = 0.8, Coding = 1.0, Reasoning = 0.7, Summarization = 0.6, ToolCalling = 0.7 }
|
|
|
|
# ─────────────────────────────────────────────────────────────
|
|
# Legacy static provider configuration (array of tables)
|
|
# Use [[providers]] when correx should connect to an already-running llama-server
|
|
# (i.e. you launch the server yourself externally).
|
|
# If [[models]] is configured, [[providers]] entries are registered as additional
|
|
# static providers alongside the managed one.
|
|
# ─────────────────────────────────────────────────────────────
|
|
# [[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 }
|
|
|
|
# Router configuration (optional, defaults shown below)
|
|
[router]
|
|
conversation_keep_last = 6 # how many recent chat turns to keep in context
|
|
retrieval_k = 5 # L3 memory hits to retrieve per query
|
|
token_budget = 4096 # context budget for router prompts
|
|
|
|
# Sampling/length for router chat + steering replies.
|
|
[router.generation]
|
|
temperature = 0.7
|
|
top_p = 0.9
|
|
max_tokens = 512
|
|
|
|
# Router narration (the live workflow commentary). max_tokens is higher than chat so
|
|
# reasoning models can finish "thinking" and still emit the line; max_per_run caps how
|
|
# many narrations fire per workflow run.
|
|
[router.narration]
|
|
temperature = 0.7
|
|
top_p = 0.9
|
|
max_tokens = 1024
|
|
max_per_run = 100
|
|
|
|
[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
|
|
|
|
# Custom artifact kinds. Each entry points to a JSON file holding the kind's JSON
|
|
# schema (object type, typed properties, required, additionalProperties). Workflows
|
|
# may then declare `produces` slots of this kind; LLM-emitted kinds are validated
|
|
# against the declared schema. schema_path is absolute, ~-relative, or relative to
|
|
# this config file's directory.
|
|
# [[artifacts]]
|
|
# id = "review_report"
|
|
# schema_path = "schemas/review_report.json"
|
|
# llm_emitted = true
|