pub struct ContextCompressionAdvice {
pub ruling: ContextRuling,
pub pressure: f32,
pub target_tokens: Option<usize>,
pub rationale: String,
}Expand description
Advice package returned by the ContextCompressionRule.
Contains the ruling plus the rationale signals that informed it, so the shell can log why a particular decision was made.
Fields§
§ruling: ContextRulingThe ruling: what the shell should do.
pressure: f32Context pressure that triggered evaluation (0.0..1.0).
target_tokens: Option<usize>Target token count if compression is needed.
rationale: StringHuman-readable rationale for the ruling.
Trait Implementations§
Source§impl Clone for ContextCompressionAdvice
impl Clone for ContextCompressionAdvice
Source§fn clone(&self) -> ContextCompressionAdvice
fn clone(&self) -> ContextCompressionAdvice
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 ContextCompressionAdvice
impl Debug for ContextCompressionAdvice
Source§impl<'de> Deserialize<'de> for ContextCompressionAdvice
impl<'de> Deserialize<'de> for ContextCompressionAdvice
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 ContextCompressionAdvice
impl RefUnwindSafe for ContextCompressionAdvice
impl Send for ContextCompressionAdvice
impl Sync for ContextCompressionAdvice
impl Unpin for ContextCompressionAdvice
impl UnsafeUnpin for ContextCompressionAdvice
impl UnwindSafe for ContextCompressionAdvice
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