pub enum Recovery {
Fail,
CompactAndRetry,
RetrySame {
after: Duration,
},
}Expand description
What the turn should do about it.
Variants§
Fail
Give up. The turn fails and the message reaches the host.
CompactAndRetry
Shorten the conversation, then retry against the same model. Failing to shorten it is a failure: retrying an unshortened request that was refused for size just spends another call to be told the same thing.
RetrySame
Wait, then send the same request again. The host is told with a
model_retry event, and the step starts over.
Trait Implementations§
impl Eq for Recovery
impl StructuralPartialEq for Recovery
Auto Trait Implementations§
impl Forget for Recovery
impl Freeze for Recovery
impl Move for Recovery
impl RefUnwindSafe for Recovery
impl Send for Recovery
impl Sync for Recovery
impl Unpin for Recovery
impl UnsafeUnpin for Recovery
impl UnwindSafe for Recovery
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