pub struct DeferConditions {
pub tool_count: Option<ConditionValue>,
pub schema_tokens: Option<ConditionValue>,
}Expand description
When Offload::defer defers tools (DeferConditions).
Checked on every model call against that call’s tools; either condition is enough, and with none it defers at any tool count. The same tools and conditions always defer the same tools, so the tools list stays the same from call to call and after a session restore. A tool change that meets a condition mid-conversation defers from the next call on, so the model then loads tools it was calling directly.
Fields§
§tool_count: Option<ConditionValue>Tools in the call at or above which it defers: a whole number above 0. The SDK’s own tools count, but not the structured output tool, so an invocation with structured output defers the same tools as one without.
schema_tokens: Option<ConditionValue>Estimated tokens of the input schemas it would defer, at or above which it defers: a whole
number above 0, or "5%" of the context window.
Implementations§
Source§impl DeferConditions
impl DeferConditions
Sourcepub fn builder() -> DeferConditionsBuilder
pub fn builder() -> DeferConditionsBuilder
Create an instance of DeferConditions using the builder syntax
Trait Implementations§
Source§impl Clone for DeferConditions
impl Clone for DeferConditions
Source§impl Debug for DeferConditions
impl Debug for DeferConditions
Source§impl Default for DeferConditions
impl Default for DeferConditions
Source§impl PartialEq for DeferConditions
impl PartialEq for DeferConditions
impl StructuralPartialEq for DeferConditions
Auto Trait Implementations§
impl Freeze for DeferConditions
impl RefUnwindSafe for DeferConditions
impl Send for DeferConditions
impl Sync for DeferConditions
impl Unpin for DeferConditions
impl UnsafeUnpin for DeferConditions
impl UnwindSafe for DeferConditions
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more