pub struct CacheWarmingDecision {
pub phase: CacheWarmingPhase,
pub warm_cost: f64,
pub miss_cost: f64,
pub continuation_probability: f64,
pub expected_savings: f64,
pub economics_available: bool,
pub warm: bool,
}Expand description
Inputs and outcome of one warm-or-stop decision, as /session shows
them.
Fields§
§phase: CacheWarmingPhaseWhen the decision is made.
warm_cost: f64Price of the refresh: a cache read of the prompt and one output token.
miss_cost: f64Extra price of the next real request if the cache entry is lost.
continuation_probability: f64Estimated chance that a real request arrives before the entry expires.
expected_savings: f64continuation_probability * miss_cost - warm_cost.
economics_available: boolFalse when the prompt size or the model’s prices are unknown.
warm: boolpi’s decision: warm when the expected savings are at least $0.05.
Trait Implementations§
Source§impl Clone for CacheWarmingDecision
impl Clone for CacheWarmingDecision
impl Copy for CacheWarmingDecision
Source§impl Debug for CacheWarmingDecision
impl Debug for CacheWarmingDecision
Source§impl PartialEq for CacheWarmingDecision
impl PartialEq for CacheWarmingDecision
impl StructuralPartialEq for CacheWarmingDecision
Auto Trait Implementations§
impl Forget for CacheWarmingDecision
impl Freeze for CacheWarmingDecision
impl RefUnwindSafe for CacheWarmingDecision
impl Send for CacheWarmingDecision
impl Sync for CacheWarmingDecision
impl Unpin for CacheWarmingDecision
impl UnsafeUnpin for CacheWarmingDecision
impl UnwindSafe for CacheWarmingDecision
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