pub struct ToolCall {
pub id: String,
pub name: String,
pub args_json: String,
pub signature: Option<String>,
}Expand description
A tool call emitted by the model inside an assistant Message.
Mirrors the wire-side polychrome.agent.v1.ToolCall; surfaced inside a
Content::ToolUse block.
Fields§
§id: StringProvider-assigned call identifier, used to correlate with ToolResult.
name: StringName of the tool being called.
args_json: StringArguments serialized as a JSON string (opaque at this layer).
signature: Option<String>Opaque, provider-specific signature attached to this call (e.g. a
thinking model’s thought signature). Some providers require it to be
echoed back verbatim on the follow-up request that carries this call
in the history; None when the provider emits no such token.
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
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