pub enum SummaryLevel {
Brief,
Standard,
Detailed,
}Expand description
Summarization level
Variants§
Brief
Brief summary: 20-30% retention 最小化保留,只提取核心意图
Standard
Standard summary: 40-50% retention 平衡保留,包含关键细节
Detailed
Detailed summary: 60-70% retention 最大化保留,保持上下文连贯性
Implementations§
Source§impl SummaryLevel
impl SummaryLevel
Sourcepub fn from_priority(priority: PriorityScore) -> Self
pub fn from_priority(priority: PriorityScore) -> Self
Determine summary level based on priority score
Sourcepub fn retention_ratio(&self) -> f32
pub fn retention_ratio(&self) -> f32
Get target retention ratio
Sourcepub fn max_tokens(&self) -> usize
pub fn max_tokens(&self) -> usize
Get maximum tokens for this level
Trait Implementations§
Source§impl Clone for SummaryLevel
impl Clone for SummaryLevel
Source§fn clone(&self) -> SummaryLevel
fn clone(&self) -> SummaryLevel
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 SummaryLevel
impl Debug for SummaryLevel
Source§impl PartialEq for SummaryLevel
impl PartialEq for SummaryLevel
Source§fn eq(&self, other: &SummaryLevel) -> bool
fn eq(&self, other: &SummaryLevel) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for SummaryLevel
impl Eq for SummaryLevel
impl StructuralPartialEq for SummaryLevel
Auto Trait Implementations§
impl Freeze for SummaryLevel
impl RefUnwindSafe for SummaryLevel
impl Send for SummaryLevel
impl Sync for SummaryLevel
impl Unpin for SummaryLevel
impl UnsafeUnpin for SummaryLevel
impl UnwindSafe for SummaryLevel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.