pub enum AgentStreamEvent {
Text {
content: String,
},
ToolCall {
state: ToolCallState,
},
ToolStart {
name: String,
input: String,
},
ToolEnd {
name: String,
output: String,
},
FinalAnswer {
content: String,
},
Error {
message: String,
},
}Expand description
Agent 流式事件
Variants§
Text
LLM 输出文本(token)
ToolCall
工具调用状态变化 (Function Calling 风格)
Fields
§
state: ToolCallStateToolStart
ReAct 风格工具调用开始
ToolEnd
ReAct 风格工具调用完成
FinalAnswer
最终答案
Error
流式执行错误
Trait Implementations§
Source§impl Clone for AgentStreamEvent
impl Clone for AgentStreamEvent
Source§fn clone(&self) -> AgentStreamEvent
fn clone(&self) -> AgentStreamEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AgentStreamEvent
impl RefUnwindSafe for AgentStreamEvent
impl Send for AgentStreamEvent
impl Sync for AgentStreamEvent
impl Unpin for AgentStreamEvent
impl UnsafeUnpin for AgentStreamEvent
impl UnwindSafe for AgentStreamEvent
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