pub struct ToolCallDelta {
pub index: u64,
pub id: Option<String>,
pub name: Option<String>,
pub arguments_fragment: Option<String>,
}Expand description
One streaming fragment of a tool call, normalized across providers.
OpenAI-wire streams delta.tool_calls entries (first delta carries
id/name, later ones argument fragments); Anthropic streams a
content_block_start (id/name) then input_json_delta fragments. Both
key fragments by a block/call index; indices may be sparse (Anthropic’s
index space is shared with text blocks), so the accumulator maps by index
rather than assuming contiguity.
Fields§
§index: u64The wire’s index for this call (de-multiplexes parallel calls).
id: Option<String>The call id (usually only on the first fragment).
name: Option<String>The tool name (usually only on the first fragment).
arguments_fragment: Option<String>A fragment of the raw JSON argument text, to be concatenated in order.
Trait Implementations§
Source§impl Clone for ToolCallDelta
impl Clone for ToolCallDelta
Source§fn clone(&self) -> ToolCallDelta
fn clone(&self) -> ToolCallDelta
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 ToolCallDelta
impl Debug for ToolCallDelta
Source§impl Default for ToolCallDelta
impl Default for ToolCallDelta
Source§fn default() -> ToolCallDelta
fn default() -> ToolCallDelta
Returns the “default value” for a type. Read more
Source§impl PartialEq for ToolCallDelta
impl PartialEq for ToolCallDelta
Source§fn eq(&self, other: &ToolCallDelta) -> bool
fn eq(&self, other: &ToolCallDelta) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ToolCallDelta
Auto Trait Implementations§
impl Freeze for ToolCallDelta
impl RefUnwindSafe for ToolCallDelta
impl Send for ToolCallDelta
impl Sync for ToolCallDelta
impl Unpin for ToolCallDelta
impl UnsafeUnpin for ToolCallDelta
impl UnwindSafe for ToolCallDelta
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