pub struct ToolPart {
pub tool_call_id: String,
pub tool_name: String,
pub state: ToolState,
pub title: Option<String>,
pub provider_executed: Option<bool>,
pub call_provider_metadata: Option<ProviderMetadata>,
pub preliminary: Option<bool>,
pub input: Option<Value>,
pub output: Option<Value>,
pub raw_input: Option<Value>,
pub error_text: Option<String>,
}Expand description
Tool invocation part (AI SDK 5.x ToolUIPart format)
Modern tool call format with streaming state support and provider execution info.
The type field uses dynamic format: “tool-{toolName}”
Fields§
§tool_call_id: String§tool_name: String§state: ToolState§title: Option<String>§provider_executed: Option<bool>§call_provider_metadata: Option<ProviderMetadata>§preliminary: Option<bool>§input: Option<Value>§output: Option<Value>§raw_input: Option<Value>§error_text: Option<String>Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolPart
impl<'de> Deserialize<'de> for ToolPart
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 ToolPart
impl RefUnwindSafe for ToolPart
impl Send for ToolPart
impl Sync for ToolPart
impl Unpin for ToolPart
impl UnwindSafe for ToolPart
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