pub enum AgentEvent {
RunStarted {
run_id: String,
session_id: String,
provider: String,
max_iterations: u32,
},
IterationStarted {
run_id: String,
session_id: String,
iteration: u32,
},
ModelOutput {
run_id: String,
session_id: String,
iteration: u32,
stop_reason: ModelStopReason,
directive_count: usize,
},
TextDelta {
run_id: String,
session_id: String,
iteration: u32,
delta: String,
},
ToolCallRequested {
run_id: String,
session_id: String,
iteration: u32,
call: ToolCall,
},
ToolCallCompleted {
run_id: String,
session_id: String,
iteration: u32,
result: ToolResultSummary,
},
ToolCallFailed {
run_id: String,
session_id: String,
iteration: u32,
call_id: String,
tool_name: String,
error: String,
},
StatePatched {
run_id: String,
session_id: String,
iteration: u32,
patch: StatePatch,
revision: u64,
},
RunErrored {
run_id: String,
session_id: String,
error: String,
},
RunFinished {
run_id: String,
session_id: String,
reason: RunStopReason,
total_iterations: u32,
final_answer: Option<String>,
},
}Variants§
RunStarted
IterationStarted
ModelOutput
Fields
§
stop_reason: ModelStopReasonTextDelta
ToolCallRequested
ToolCallCompleted
ToolCallFailed
Fields
StatePatched
RunErrored
RunFinished
Implementations§
Source§impl AgentEvent
impl AgentEvent
pub fn as_sse_data(&self) -> Result<String, Error>
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 JsonSchema for AgentEvent
impl JsonSchema for AgentEvent
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreSource§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 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