pub struct SummaryRequestBudget {
pub context_window_tokens: u32,
pub max_output_tokens: u32,
pub safety_margin_tokens: u32,
pub safe_window_percent: u8,
pub target_summary_tokens: u32,
pub target_ratio: f64,
}Expand description
Hard request limits for a logical compression pass.
Fields§
§context_window_tokens: u32§max_output_tokens: u32§safety_margin_tokens: u32§safe_window_percent: u8§target_summary_tokens: u32§target_ratio: f64Implementations§
Source§impl SummaryRequestBudget
impl SummaryRequestBudget
pub fn from_token_budget( budget: &TokenBudget, safe_window_percent: u8, target_summary_tokens: u32, target_ratio: f64, ) -> Self
Trait Implementations§
Source§impl Clone for SummaryRequestBudget
impl Clone for SummaryRequestBudget
Source§fn clone(&self) -> SummaryRequestBudget
fn clone(&self) -> SummaryRequestBudget
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 moreAuto Trait Implementations§
impl Freeze for SummaryRequestBudget
impl RefUnwindSafe for SummaryRequestBudget
impl Send for SummaryRequestBudget
impl Sync for SummaryRequestBudget
impl Unpin for SummaryRequestBudget
impl UnsafeUnpin for SummaryRequestBudget
impl UnwindSafe for SummaryRequestBudget
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