pub struct PromptBudgetConfig {
pub prompt_overhead_tokens: u32,
pub output_reserve_tokens: u32,
pub safety_margin_tokens: u32,
}Expand description
Host-counted provider request overhead and reserves deducted before context rendering. These values are input facts, so configuring them through the kernel journal makes replay use the same hard prompt allowance as the original run.
Fields§
§prompt_overhead_tokens: u32§output_reserve_tokens: u32§safety_margin_tokens: u32Implementations§
Source§impl PromptBudgetConfig
impl PromptBudgetConfig
pub fn reserved_tokens(self) -> u32
Trait Implementations§
Source§impl Clone for PromptBudgetConfig
impl Clone for PromptBudgetConfig
Source§fn clone(&self) -> PromptBudgetConfig
fn clone(&self) -> PromptBudgetConfig
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 moreimpl Copy for PromptBudgetConfig
Source§impl Debug for PromptBudgetConfig
impl Debug for PromptBudgetConfig
Source§impl Default for PromptBudgetConfig
impl Default for PromptBudgetConfig
Source§fn default() -> PromptBudgetConfig
fn default() -> PromptBudgetConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for PromptBudgetConfig
impl<'de> Deserialize<'de> for PromptBudgetConfig
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 PromptBudgetConfig
Source§impl PartialEq for PromptBudgetConfig
impl PartialEq for PromptBudgetConfig
Source§impl Serialize for PromptBudgetConfig
impl Serialize for PromptBudgetConfig
impl StructuralPartialEq for PromptBudgetConfig
Auto Trait Implementations§
impl Freeze for PromptBudgetConfig
impl RefUnwindSafe for PromptBudgetConfig
impl Send for PromptBudgetConfig
impl Sync for PromptBudgetConfig
impl Unpin for PromptBudgetConfig
impl UnsafeUnpin for PromptBudgetConfig
impl UnwindSafe for PromptBudgetConfig
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