pub enum ToolEvent {
Call {
request: ToolCallRequest,
},
CallUpdate {
tool_call_id: String,
chunk: String,
},
ExecutionStarted {
tool_id: String,
tool_name: String,
},
Progress {
request: ToolCallRequest,
progress: f64,
total: Option<f64>,
message: Option<String>,
},
Result {
result: ToolCallResult,
result_meta: Option<ToolResultMeta>,
},
Error {
error: ToolCallError,
},
DefinitionsUpdated {
tools: Vec<ToolDefinition>,
},
}Expand description
Tool call lifecycle events.
Variants§
Call
The LLM requested a tool call; arguments may still be streaming.
Fields
§
request: ToolCallRequestCallUpdate
A chunk of streamed tool call arguments.
ExecutionStarted
The tool began executing.
Progress
Progress reported by an executing tool.
Result
The tool completed successfully.
Error
The tool failed.
Fields
§
error: ToolCallErrorDefinitionsUpdated
The set of available tool definitions changed.
Fields
§
tools: Vec<ToolDefinition>Trait Implementations§
Source§impl<'de> Deserialize<'de> for ToolEvent
impl<'de> Deserialize<'de> for ToolEvent
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 ToolEvent
impl JsonSchema for ToolEvent
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 inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for ToolEvent
Auto Trait Implementations§
impl Freeze for ToolEvent
impl RefUnwindSafe for ToolEvent
impl Send for ToolEvent
impl Sync for ToolEvent
impl Unpin for ToolEvent
impl UnsafeUnpin for ToolEvent
impl UnwindSafe for ToolEvent
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