pub struct ToolCall {
pub id: ToolCallId,
pub kind: ToolType,
pub function_call: FunctionCall,
}Expand description
Represents tool call details returned by the API.
This structure appears in responses when the model indicates that a tool should be invoked.
The kind field is a type-safe enum that only allows valid tool types.
Fields§
§id: ToolCallIdA unique identifier for the tool call.
kind: ToolTypeThe type of call. Only ToolType::Function is currently supported.
function_call: FunctionCallThe details of the function call, including its function name and arguments.
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