pub struct ToolCallStartEvent {
pub base: BaseEvent,
pub tool_call_id: ToolCallId,
pub tool_call_name: String,
pub parent_message_id: Option<MessageId>,
}Expand description
Event indicating the start of a tool call.
This event is sent when the agent begins calling a tool with specific parameters. The tool_call_id identifies this call throughout the streaming process.
Fields§
§base: BaseEventCommon event fields (timestamp, rawEvent).
tool_call_id: ToolCallIdUnique identifier for this tool call.
tool_call_name: StringName of the tool being called.
parent_message_id: Option<MessageId>Optional parent message ID if this call is part of a message.
Implementations§
Source§impl ToolCallStartEvent
impl ToolCallStartEvent
Sourcepub fn new(
tool_call_id: impl Into<ToolCallId>,
tool_call_name: impl Into<String>,
) -> ToolCallStartEvent
pub fn new( tool_call_id: impl Into<ToolCallId>, tool_call_name: impl Into<String>, ) -> ToolCallStartEvent
Creates a new ToolCallStartEvent.
Sourcepub fn with_parent_message_id(
self,
message_id: impl Into<MessageId>,
) -> ToolCallStartEvent
pub fn with_parent_message_id( self, message_id: impl Into<MessageId>, ) -> ToolCallStartEvent
Sets the parent message ID.
Sourcepub fn with_timestamp(self, timestamp: f64) -> ToolCallStartEvent
pub fn with_timestamp(self, timestamp: f64) -> ToolCallStartEvent
Sets the timestamp for this event.
Trait Implementations§
Source§impl Clone for ToolCallStartEvent
impl Clone for ToolCallStartEvent
Source§fn clone(&self) -> ToolCallStartEvent
fn clone(&self) -> ToolCallStartEvent
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 ToolCallStartEvent
impl Debug for ToolCallStartEvent
Source§impl<'de> Deserialize<'de> for ToolCallStartEvent
impl<'de> Deserialize<'de> for ToolCallStartEvent
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallStartEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolCallStartEvent, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ToolCallStartEvent
impl PartialEq for ToolCallStartEvent
Source§impl Serialize for ToolCallStartEvent
impl Serialize for ToolCallStartEvent
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ToolCallStartEvent
Auto Trait Implementations§
impl Freeze for ToolCallStartEvent
impl RefUnwindSafe for ToolCallStartEvent
impl Send for ToolCallStartEvent
impl Sync for ToolCallStartEvent
impl Unpin for ToolCallStartEvent
impl UnsafeUnpin for ToolCallStartEvent
impl UnwindSafe for ToolCallStartEvent
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