pub enum AgentEvent {
AgentStart,
AgentEnd {
messages: Vec<AgentMessage>,
},
TurnStart,
TurnEnd {
message: AgentMessage,
tool_results: Vec<ToolResultMessage>,
},
MessageStart {
message: AgentMessage,
},
MessageUpdate {
message: AgentMessage,
assistant_event: Box<AssistantMessageEvent>,
},
MessageEnd {
message: AgentMessage,
},
ToolExecutionStart {
tool_call_id: String,
tool_name: String,
args: Value,
},
ToolExecutionUpdate {
tool_call_id: String,
tool_name: String,
partial_result: Value,
},
ToolExecutionEnd {
tool_call_id: String,
tool_name: String,
result: Value,
is_error: bool,
},
}Expand description
Agent event types.
Variants§
AgentStart
Agent started.
AgentEnd
Agent finished.
Fields
§
messages: Vec<AgentMessage>TurnStart
Turn started.
TurnEnd
Turn finished.
MessageStart
Message started.
Fields
§
message: AgentMessageMessageUpdate
Message updated (streaming).
MessageEnd
Message finished.
Fields
§
message: AgentMessageToolExecutionStart
Tool execution started.
ToolExecutionUpdate
Tool execution progress (streaming partial results from tools).
ToolExecutionEnd
Tool execution finished.
Trait Implementations§
Source§impl Clone for AgentEvent
impl Clone for AgentEvent
Source§fn clone(&self) -> AgentEvent
fn clone(&self) -> AgentEvent
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 AgentEvent
impl Debug for AgentEvent
Source§impl<'de> Deserialize<'de> for AgentEvent
impl<'de> Deserialize<'de> for AgentEvent
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 AgentEvent
impl PartialEq for AgentEvent
Source§impl Serialize for AgentEvent
impl Serialize for AgentEvent
impl StructuralPartialEq for AgentEvent
Auto Trait Implementations§
impl Freeze for AgentEvent
impl RefUnwindSafe for AgentEvent
impl Send for AgentEvent
impl Sync for AgentEvent
impl Unpin for AgentEvent
impl UnsafeUnpin for AgentEvent
impl UnwindSafe for AgentEvent
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