pub struct ToolCall {
pub id: String,
pub name: ToolName,
pub args: Payload,
}Fields§
§id: StringWire identity: tool_use and tool_result pair by this id on
both dialects. Scripted adapters synthesize deterministic ids.
name: ToolName§args: PayloadImplementations§
Source§impl ToolCall
impl ToolCall
Sourcepub fn action(&self) -> Result<Vec<u8>, AxError>
pub fn action(&self) -> Result<Vec<u8>, AxError>
The bytes that say what this call does, for IdemKey::derive to
take as its action_canonical.
The name and the arguments together are the action: two calls of
one tool with different arguments are two actions, and a key that
read only the name made them one. id stays out, because two
calls differing only by wire id are the same action.
§Errors
Propagates arguments that do not serialise, which keeps the key honest: substituting an empty string would collide two different calls into one key.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolCall
impl<'de> Deserialize<'de> for ToolCall
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
impl StructuralPartialEq for ToolCall
Auto Trait Implementations§
impl Freeze for ToolCall
impl RefUnwindSafe for ToolCall
impl Send for ToolCall
impl Sync for ToolCall
impl Unpin for ToolCall
impl UnsafeUnpin for ToolCall
impl UnwindSafe for ToolCall
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