pub struct ToolCallChunk {
pub name: Option<String>,
pub args: Option<String>,
pub id: Option<String>,
pub index: Option<i32>,
}Expand description
A tool call chunk (yielded when streaming).
When merging tool call chunks, all string attributes are concatenated.
Chunks are only merged if their values of index are equal and not None.
Fields§
§name: Option<String>The name of the tool to be called (may be partial during streaming)
args: Option<String>The arguments to the tool call (may be partial JSON string during streaming)
id: Option<String>An identifier associated with the tool call
index: Option<i32>The index of the tool call in a sequence
Implementations§
Trait Implementations§
Source§impl Clone for ToolCallChunk
impl Clone for ToolCallChunk
Source§fn clone(&self) -> ToolCallChunk
fn clone(&self) -> ToolCallChunk
Returns a duplicate of the value. Read more
1.0.0 · 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 ToolCallChunk
impl Debug for ToolCallChunk
Source§impl<'de> Deserialize<'de> for ToolCallChunk
impl<'de> Deserialize<'de> for ToolCallChunk
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 ToolCallChunk
impl PartialEq for ToolCallChunk
Source§impl Serialize for ToolCallChunk
impl Serialize for ToolCallChunk
impl StructuralPartialEq for ToolCallChunk
Auto Trait Implementations§
impl Freeze for ToolCallChunk
impl RefUnwindSafe for ToolCallChunk
impl Send for ToolCallChunk
impl Sync for ToolCallChunk
impl Unpin for ToolCallChunk
impl UnwindSafe for ToolCallChunk
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