pub struct DefaultRecovery {
pub max_output_escalations: u32,
}Expand description
The engine’s own answers.
Fields§
§max_output_escalations: u32How many output-limit escalations a turn may spend.
Implementations§
Source§impl DefaultRecovery
impl DefaultRecovery
Sourcepub const FIRST_ESCALATION: u32 = 64_000
pub const FIRST_ESCALATION: u32 = 64_000
First escalation goes straight to 64K on the theory that a response cut off once will be cut off again at a smaller bump; later ones settle at 8K. The engine holds either to the model’s own limit.
pub const LATER_ESCALATION: u32 = 8_000
pub const NUDGE: &'static str = "Your previous reply was cut off at the output token \ limit. Continue from exactly where it stopped — no \ apology, no recap of what you were doing. Pick up \ mid-thought if that is where the cut happened. Break \ remaining work into smaller pieces."
Sourcepub const SAME_RETRY_DELAYS: &'static [Duration]
pub const SAME_RETRY_DELAYS: &'static [Duration]
How long to wait before each Recovery::RetrySame when the provider
named no delay. Its length is the budget.
Trait Implementations§
Source§impl Default for DefaultRecovery
impl Default for DefaultRecovery
Source§impl RecoveryPolicy for DefaultRecovery
impl RecoveryPolicy for DefaultRecovery
Source§fn on_failure(
&self,
failure: &ModelFailure<'_>,
so_far: &CallRecovery,
) -> Recovery
fn on_failure( &self, failure: &ModelFailure<'_>, so_far: &CallRecovery, ) -> Recovery
The call failed, after
so_far was already spent on it.Source§fn on_early_stop(&self, reason: &str, attempt: &RecoveryAttempt) -> StopRecovery
fn on_early_stop(&self, reason: &str, attempt: &RecoveryAttempt) -> StopRecovery
The call succeeded but stopped early —
reason is the model’s own
stop reason. Read moreAuto Trait Implementations§
impl Forget for DefaultRecovery
impl Freeze for DefaultRecovery
impl Move for DefaultRecovery
impl RefUnwindSafe for DefaultRecovery
impl Send for DefaultRecovery
impl Sync for DefaultRecovery
impl Unpin for DefaultRecovery
impl UnsafeUnpin for DefaultRecovery
impl UnwindSafe for DefaultRecovery
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