pub enum ToolResultDisposition {
Recoverable,
Fatal,
}Expand description
Can the batch continue past this result?
Binary and required: it has no serde default, so every result states it. The alternative —
defaulting to recoverable to save wire bytes — makes the dangerous value the silent one, which
is the wrong way round for a fail-closed contract, and it makes “the host did not say” and “the
host said it is fine” indistinguishable at exactly the point where they differ most.
The historical is_fatal + six-way ToolErrorKind collapsed to these two values because only
two distinctions ever changed a kernel decision. user_interrupt in particular is not here:
cancellation travels on HostControl::Cancel and nothing else (§7.9), so the rollback rung it
used to trigger was retired rather than being re-expressible as a tool result.
Variants§
Recoverable
The model can adapt and the executor kept going. Ordinary failures are this: a committed, model-visible error result is the trained-set convention, and erasing the attempt teaches the model nothing.
Fatal
The executor stopped. Every call this batch dispatched but did not answer is closed out by the kernel with a visible “not executed” result, so the tool_call/tool_result pairing the provider contract requires stays total (see the tools arm of the driver’s resolution).
Implementations§
Trait Implementations§
Source§impl Clone for ToolResultDisposition
impl Clone for ToolResultDisposition
Source§fn clone(&self) -> ToolResultDisposition
fn clone(&self) -> ToolResultDisposition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for ToolResultDisposition
Source§impl Debug for ToolResultDisposition
impl Debug for ToolResultDisposition
Source§impl Default for ToolResultDisposition
impl Default for ToolResultDisposition
Source§fn default() -> ToolResultDisposition
fn default() -> ToolResultDisposition
Source§impl<'de> Deserialize<'de> for ToolResultDisposition
impl<'de> Deserialize<'de> for ToolResultDisposition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ToolResultDisposition
impl Display for ToolResultDisposition
impl Eq for ToolResultDisposition
Source§impl Hash for ToolResultDisposition
impl Hash for ToolResultDisposition
Source§impl Ord for ToolResultDisposition
impl Ord for ToolResultDisposition
Source§fn cmp(&self, other: &ToolResultDisposition) -> Ordering
fn cmp(&self, other: &ToolResultDisposition) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ToolResultDisposition
impl PartialEq for ToolResultDisposition
Source§impl PartialOrd for ToolResultDisposition
impl PartialOrd for ToolResultDisposition
Source§impl Serialize for ToolResultDisposition
impl Serialize for ToolResultDisposition
impl StructuralPartialEq for ToolResultDisposition
Auto Trait Implementations§
impl Freeze for ToolResultDisposition
impl RefUnwindSafe for ToolResultDisposition
impl Send for ToolResultDisposition
impl Sync for ToolResultDisposition
impl Unpin for ToolResultDisposition
impl UnsafeUnpin for ToolResultDisposition
impl UnwindSafe for ToolResultDisposition
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more