Struct Compaction
pub struct Compaction {
pub turn: u32,
pub dropped_turns: u32,
pub reason: CompactionReason,
pub summarised: bool,
pub sessions: bool,
pub rejected: Option<String>,
pub skills: Vec<String>,
pub pointers: Vec<String>,
pub pinned: Vec<String>,
pub carried: bool,
}Expand description
One compaction of a run, in Conversation::compactions.
Fields§
§turn: u32Conversation::turns of the run that made it: the request with
this index (counting model turns, not summary requests) is the first of a new prefix.
dropped_turns: u32How many turns left the history.
reason: CompactionReasonWhy.
summarised: boolWhether a summary was made. An overflow whose summary request was rejected too drops the turns without one, and the marker says so.
sessions: boolWhether a subagent_start or subagent_send call was among the turns that left: the run
still waits for, and cancels, the sessions it started.
rejected: Option<String>What the provider said when it rejected the prompt (reason overflow).
skills: Vec<String>The skills that were loaded in the turns that left, by name.
pointers: Vec<String>The output ids of the kept outputs the turns that left held a pointer to.
pinned: Vec<String>The pinned results that were in the turns that left (ToolOutput::pinned),
oldest first.
carried: boolWhether this is what a run that continues another carried of the compactions before it,
folded into one: turn is a turn of that earlier run, and it is not one of this run’s
MAX_COMPACTIONS.
Trait Implementations§
§impl Clone for Compaction
impl Clone for Compaction
§fn clone(&self) -> Compaction
fn clone(&self) -> Compaction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for Compaction
impl Debug for Compaction
§impl<'de> Deserialize<'de> for Compaction
impl<'de> Deserialize<'de> for Compaction
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Compaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Compaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for Compaction
§impl PartialEq for Compaction
impl PartialEq for Compaction
§impl Serialize for Compaction
impl Serialize for Compaction
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for Compaction
Auto Trait Implementations§
impl Freeze for Compaction
impl RefUnwindSafe for Compaction
impl Send for Compaction
impl Sync for Compaction
impl Unpin for Compaction
impl UnsafeUnpin for Compaction
impl UnwindSafe for Compaction
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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 more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].