pub struct Compaction {
pub id: u64,
pub after_entry: u64,
pub tokens_before: u64,
pub tokens_after: u64,
pub summary: String,
pub manual: bool,
pub focus: Option<String>,
pub created_at: i64,
}Expand description
One compaction of the chat in view.
Fields§
§id: u64§after_entry: u64The summary stands in for every entry up to and including this one (0: it was made before the chat’s first entry finished). Clients draw the divider after it.
tokens_before: u64Estimated tokens of the request before and after.
tokens_after: u64§summary: StringThe summary the model wrote (markdown).
manual: boolThe user asked for it (/compact), rather than the context threshold.
focus: Option<String>What the user asked the summary to keep.
created_at: i64Milliseconds since the Unix epoch.
Implementations§
Trait Implementations§
Source§impl Clone for Compaction
impl Clone for Compaction
Source§impl Debug for Compaction
impl Debug for Compaction
Source§impl<'de> Deserialize<'de> for Compaction
impl<'de> Deserialize<'de> for Compaction
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
impl Eq for Compaction
Source§impl PartialEq for Compaction
impl PartialEq for Compaction
Source§impl Serialize for Compaction
impl Serialize for Compaction
impl StructuralPartialEq for Compaction
Auto Trait Implementations§
impl Forget for Compaction
impl Freeze for Compaction
impl Move 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
Mutably borrows from an owned value. Read more