pub struct EngineBudget {
pub compact_threshold: Option<usize>,
pub compact_keep_recent: Option<usize>,
}Expand description
The engine’s own numbers for what a policy judges: the output target and
the compaction settings. Its token ceilings are on the SpendNodes.
Fields§
§compact_threshold: Option<usize>settings.compaction: over the scene’s threshold and kept rounds when
set.
compact_keep_recent: Option<usize>Trait Implementations§
Source§impl BudgetPolicy for EngineBudget
impl BudgetPolicy for EngineBudget
Source§fn on_output_target(&self, p: &OutputProgress) -> OutputTarget
fn on_output_target(&self, p: &OutputProgress) -> OutputTarget
When the model has stopped and a volume of output was asked for. Read more
Source§fn context_budget(&self, scene: &TokenBudget) -> ContextBudget
fn context_budget(&self, scene: &TokenBudget) -> ContextBudget
What the scene asked for, and what the deployment will actually allow.
Source§fn on_usage(&self, _spend: &Spend) -> Spending
fn on_usage(&self, _spend: &Spend) -> Spending
After a model call, against the root turn’s reading
(
SpendNode::whole_turn) then. A turn the engine’s ceilings
already ended does not ask.Source§fn remaining(&self, _spend: &Spend) -> Option<Remaining>
fn remaining(&self, _spend: &Spend) -> Option<Remaining>
Before a model call, against the root turn’s reading. The call is not
sent when less than
MIN_CALL_TOKENS remain under this or any of
the engine’s ceilings, and otherwise asks for no more output than the
tightest leaves. None: no ceiling of the policy’s own.Auto Trait Implementations§
impl Forget for EngineBudget
impl Freeze for EngineBudget
impl Move for EngineBudget
impl RefUnwindSafe for EngineBudget
impl Send for EngineBudget
impl Sync for EngineBudget
impl Unpin for EngineBudget
impl UnsafeUnpin for EngineBudget
impl UnwindSafe for EngineBudget
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