pub struct AetherConfig {Show 14 fields
pub toon_enabled: bool,
pub healing_enabled: bool,
pub cache_enabled: bool,
pub parallel: bool,
pub inspector_enabled: bool,
pub inspector_port: u16,
pub max_retries: u32,
pub auto_toon_threshold: Option<usize>,
pub cache_threshold: f32,
pub prompt_toon_header: String,
pub prompt_toon_note: String,
pub prompt_healing_feedback: String,
pub prompt_tdd_notice: String,
pub retry_backoff_ms: u64,
}Expand description
Global configuration for the Aether engine.
§Example
use aether_core::AetherConfig;
// Load from environment
let config = AetherConfig::from_env();
// Or customize
let config = AetherConfig::default()
.with_toon(true)
.with_healing(true);Fields§
§toon_enabled: boolEnable TOON (Token-Oriented Object Notation) for context compression. Reduces token usage by 30-60% for structured data. Default: false, Env: AETHER_TOON=true
healing_enabled: boolEnable Self-Healing mode (automatic validation and retry on errors). Default: false, Env: AETHER_HEALING=true
cache_enabled: boolEnable Semantic Cache (reduces API costs for similar prompts). Default: false, Env: AETHER_CACHE=true
parallel: boolEnable parallel slot generation. Default: true, Env: AETHER_PARALLEL=false
inspector_enabled: boolWhether to enable the Aether Inspector UI. Default: false, Env: AETHER_INSPECT=true
inspector_port: u16Port for the Aether Inspector UI. Default: 3000, Env: AETHER_INSPECT_PORT=8080
max_retries: u32Maximum retries for failed generations. Default: 2, Env: AETHER_MAX_RETRIES=3
auto_toon_threshold: Option<usize>Auto-enable TOON when context exceeds this character count. If None, TOON is only enabled manually. Default: Some(2000), Env: AETHER_TOON_THRESHOLD=2000
cache_threshold: f32Cache similarity threshold (0.0 - 1.0). Higher values require more similar prompts to hit the cache. Default: 0.90, Env: AETHER_CACHE_THRESHOLD=0.90
prompt_toon_header: StringPrompt header for TOON context block.
prompt_toon_note: StringInstructional note for the AI about TOON protocol.
prompt_healing_feedback: StringFeedback prefix for self-healing retries.
prompt_tdd_notice: StringNotice added when TDD mode is active.
retry_backoff_ms: u64Base delay for retry backoff in milliseconds.
Implementations§
Source§impl AetherConfig
impl AetherConfig
Sourcepub fn from_env() -> Self
pub fn from_env() -> Self
Create a new config from environment variables. Falls back to defaults for missing variables.
Sourcepub fn with_healing(self, enabled: bool) -> Self
pub fn with_healing(self, enabled: bool) -> Self
Builder: Enable or disable Self-Healing.
Sourcepub fn with_cache(self, enabled: bool) -> Self
pub fn with_cache(self, enabled: bool) -> Self
Builder: Enable or disable Semantic Cache.
Sourcepub fn with_parallel(self, enabled: bool) -> Self
pub fn with_parallel(self, enabled: bool) -> Self
Builder: Enable or disable parallel generation.
Sourcepub fn with_inspector(self, enabled: bool) -> Self
pub fn with_inspector(self, enabled: bool) -> Self
Builder: Enable or disable Aether Inspector.
Sourcepub fn with_inspector_port(self, port: u16) -> Self
pub fn with_inspector_port(self, port: u16) -> Self
Builder: Set Aether Inspector port.
Sourcepub fn with_max_retries(self, retries: u32) -> Self
pub fn with_max_retries(self, retries: u32) -> Self
Builder: Set maximum retries.
Sourcepub fn with_auto_toon_threshold(self, threshold: Option<usize>) -> Self
pub fn with_auto_toon_threshold(self, threshold: Option<usize>) -> Self
Builder: Set auto TOON threshold.
Sourcepub fn should_use_toon(&self, context_length: usize) -> bool
pub fn should_use_toon(&self, context_length: usize) -> bool
Check if TOON should be used for a given context length.
Sourcepub fn default_cache(&self) -> Result<TieredCache>
pub fn default_cache(&self) -> Result<TieredCache>
Create a recommended default cache for the engine.
Returns a TieredCache (Hybrid Exact + Semantic).
Trait Implementations§
Source§impl Clone for AetherConfig
impl Clone for AetherConfig
Source§fn clone(&self) -> AetherConfig
fn clone(&self) -> AetherConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AetherConfig
impl Debug for AetherConfig
Auto Trait Implementations§
impl Freeze for AetherConfig
impl RefUnwindSafe for AetherConfig
impl Send for AetherConfig
impl Sync for AetherConfig
impl Unpin for AetherConfig
impl UnwindSafe for AetherConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().