pub enum HistoryEntry {
Completed {
invocation: ToolInvocation,
output: Value,
},
Failed {
invocation: ToolInvocation,
class: RetryClass,
message: String,
},
}Expand description
One entry in a tool-call history slice fed back to the model.
Variants§
Completed
The invocation completed and produced output.
Fields
§
invocation: ToolInvocationThe invocation that ran.
Failed
The invocation failed; class records the retry verdict and
message carries the error rendering.
Fields
§
invocation: ToolInvocationThe invocation that failed.
§
class: RetryClassRetry verdict from a RetryClassifier.
§
message: Stringerror.to_string() of the underlying KernelError.
Implementations§
Source§impl HistoryEntry
impl HistoryEntry
Sourcepub fn fingerprint(&self) -> ToolCallFingerprint
pub fn fingerprint(&self) -> ToolCallFingerprint
Return the fingerprint of this entry’s invocation.
Sourcepub fn completed(result: ToolInvocationResult) -> Self
pub fn completed(result: ToolInvocationResult) -> Self
Convenience: build a Completed entry from a ToolInvocationResult.
Sourcepub fn failed<C: RetryClassifier>(
invocation: ToolInvocation,
error: &KernelError,
classifier: &C,
) -> Self
pub fn failed<C: RetryClassifier>( invocation: ToolInvocation, error: &KernelError, classifier: &C, ) -> Self
Convenience: classify error with classifier and build a Failed
entry that records the verdict and the error rendering.
Trait Implementations§
Source§impl Clone for HistoryEntry
impl Clone for HistoryEntry
Source§fn clone(&self) -> HistoryEntry
fn clone(&self) -> HistoryEntry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HistoryEntry
impl Debug for HistoryEntry
Source§impl PartialEq for HistoryEntry
impl PartialEq for HistoryEntry
Source§fn eq(&self, other: &HistoryEntry) -> bool
fn eq(&self, other: &HistoryEntry) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HistoryEntry
Auto Trait Implementations§
impl Freeze for HistoryEntry
impl RefUnwindSafe for HistoryEntry
impl Send for HistoryEntry
impl Sync for HistoryEntry
impl Unpin for HistoryEntry
impl UnsafeUnpin for HistoryEntry
impl UnwindSafe for HistoryEntry
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