Skip to main content

Crate terraphim_config

Crate terraphim_config 

Source
Expand description

Configuration management for Terraphim AI.

Provides role-based configuration where each Role describes a user profile with a set of Haystacks (data sources), a relevance function, and optional LLM settings.

§Loading Priority

  1. Explicit path via TERRAPHIM_CONFIG environment variable
  2. Saved config retrieved from the persistence layer
  3. Hard-coded defaults in terraphim_server/default/

§Key Types

  • Config – top-level configuration holding all roles
  • Role – user profile with haystacks, relevance function, and theme
  • Haystack – a data source descriptor (path, service type, extra parameters)
  • ServiceType – enum of supported haystack backends

Modules§

llm_router
LLM Router Configuration Types
project

Structs§

Config
The Terraphim config is the main configuration for terraphim
ConfigBuilder
Builder, which allows to create a new Config
ConfigState
Config state can be updated using the API or Atomic Server
Haystack
A haystack is a collection of documents that can be indexed and searched
KnowledgeGraph
A knowledge graph is the collection of documents which were indexed using a specific service
KnowledgeGraphLocal
Local knowledge-graph source: an input type paired with a filesystem path.
Role
A role is a collection of settings for a specific user

Enums§

ConfigId
Distinguishes how the configuration is deployed: as a background server, a desktop application, or compiled-in (WASM/library) mode.
ServiceType
The service used for indexing documents
TerraphimConfigError
Errors arising from loading, validating, or persisting Terraphim configuration.

Functions§

expand_path
Expand shell-like variables in a path string.

Type Aliases§

Result
Convenience alias for Result<T, TerraphimConfigError> used throughout this crate.