pub struct ContextConfig {
pub model: String,
pub max_tokens: usize,
pub strategy: OptimizerStrategy,
pub monitoring: bool,
pub output_reserve_pct: f64,
}Expand description
Configuration for context management.
Fields§
§model: StringModel name for token limits
max_tokens: usizeMaximum context tokens (0 = auto from model)
strategy: OptimizerStrategyOptimization strategy
monitoring: boolEnable context monitoring
output_reserve_pct: f64Output reserve percentage
Implementations§
Source§impl ContextConfig
impl ContextConfig
Sourcepub fn max_tokens(self, tokens: usize) -> Self
pub fn max_tokens(self, tokens: usize) -> Self
Set max tokens
Sourcepub fn strategy(self, strategy: OptimizerStrategy) -> Self
pub fn strategy(self, strategy: OptimizerStrategy) -> Self
Set optimization strategy
Sourcepub fn with_monitoring(self) -> Self
pub fn with_monitoring(self) -> Self
Enable monitoring
Sourcepub fn output_reserve_pct(self, pct: f64) -> Self
pub fn output_reserve_pct(self, pct: f64) -> Self
Set output reserve percentage
Trait Implementations§
Source§impl Clone for ContextConfig
impl Clone for ContextConfig
Source§fn clone(&self) -> ContextConfig
fn clone(&self) -> ContextConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContextConfig
impl Debug for ContextConfig
Source§impl Default for ContextConfig
impl Default for ContextConfig
Source§impl<'de> Deserialize<'de> for ContextConfig
impl<'de> Deserialize<'de> for ContextConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ContextConfig
impl RefUnwindSafe for ContextConfig
impl Send for ContextConfig
impl Sync for ContextConfig
impl Unpin for ContextConfig
impl UnwindSafe for ContextConfig
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
Mutably borrows from an owned value. Read more