pub struct ConversationConfig {
pub compression_enabled: bool,
pub preserve_last_n_turns: usize,
pub compression_threshold_tokens: usize,
pub min_score_to_preserve: f64,
pub summarize_score_range: [f64; 2],
pub drop_score_below: f64,
pub ccr_store_dropped: bool,
}Expand description
Opt-in conversation-history compression settings (#1123).
The proxy leaves conversation history byte-for-byte unchanged unless
compression_enabled is true and the configured token threshold is met.
Fields§
§compression_enabled: boolEnable message-level compression in the proxy. Default: false.
preserve_last_n_turns: usizeNumber of recent user turns (and their following messages) to preserve.
compression_threshold_tokens: usizeMinimum estimated message-array size before compression starts.
min_score_to_preserve: f64Minimum score for verbatim preservation.
summarize_score_range: [f64; 2]Inclusive lower bound and exclusive upper bound for summaries.
drop_score_below: f64Scores below this value are eligible for drop + CCR.
ccr_store_dropped: boolStore dropped messages in the content-addressed recovery store.
Trait Implementations§
Source§impl Clone for ConversationConfig
impl Clone for ConversationConfig
Source§fn clone(&self) -> ConversationConfig
fn clone(&self) -> ConversationConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ConversationConfig
impl Debug for ConversationConfig
Source§impl Default for ConversationConfig
impl Default for ConversationConfig
Source§impl<'de> Deserialize<'de> for ConversationConfigwhere
ConversationConfig: Default,
impl<'de> Deserialize<'de> for ConversationConfigwhere
ConversationConfig: Default,
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
Source§impl PartialEq for ConversationConfig
impl PartialEq for ConversationConfig
Source§impl Serialize for ConversationConfig
impl Serialize for ConversationConfig
impl StructuralPartialEq for ConversationConfig
Auto Trait Implementations§
impl Freeze for ConversationConfig
impl RefUnwindSafe for ConversationConfig
impl Send for ConversationConfig
impl Sync for ConversationConfig
impl Unpin for ConversationConfig
impl UnsafeUnpin for ConversationConfig
impl UnwindSafe for ConversationConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
Converts
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> ⓘ
Converts
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 more