pub struct ToolExchange {
pub index: usize,
pub node: String,
pub tool: String,
pub invocation_digest: String,
pub result_type: String,
pub value: Option<Value>,
pub error: Option<String>,
}Expand description
One tool invocation and what it returned.
Fields§
§index: usize§node: StringThe IR node that made the call.
tool: StringBare tool name, e.g. web.search.
invocation_digest: StringDigest of everything that determined the answer.
result_type: StringThe Ingot type the tool is declared to return.
value: Option<Value>What the tool returned, already typed as the artifact declared.
Absent when the recorded call failed: a failure has no value, and
writing null would make “returned nothing” and “did not run”
indistinguishable.
error: Option<String>The failure the tool produced, when it produced one.
Recorded rather than dropped: an agent’s behaviour when a tool fails is exactly the behaviour worth having a test for, and a cassette that could only record success would be a cassette of the happy path.
Trait Implementations§
Source§impl Clone for ToolExchange
impl Clone for ToolExchange
Source§fn clone(&self) -> ToolExchange
fn clone(&self) -> ToolExchange
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 ToolExchange
impl Debug for ToolExchange
Source§impl<'de> Deserialize<'de> for ToolExchange
impl<'de> Deserialize<'de> for ToolExchange
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ToolExchange
impl PartialEq for ToolExchange
Source§impl Serialize for ToolExchange
impl Serialize for ToolExchange
impl StructuralPartialEq for ToolExchange
Auto Trait Implementations§
impl Freeze for ToolExchange
impl RefUnwindSafe for ToolExchange
impl Send for ToolExchange
impl Sync for ToolExchange
impl Unpin for ToolExchange
impl UnsafeUnpin for ToolExchange
impl UnwindSafe for ToolExchange
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