pub enum ToolCallDecision {
Continue,
Modify(ToolCall),
Block(String),
ShortCircuit(ToolResult),
}Expand description
ToolHooks::before_tool_call decision.
Variants§
Continue
Continue with the current call.
Modify(ToolCall)
Replace the call before execution.
The runtime preserves the model-assigned id, accepts the replacement name
and arguments, and attributes an empty replacement name to this hook as a
typed model::RequestError::EmptyToolCallName failure.
Block(String)
Block execution with a nonempty hook reason.
ShortCircuit(ToolResult)
Supply a closed result without execution.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ToolCallDecision
impl RefUnwindSafe for ToolCallDecision
impl Send for ToolCallDecision
impl Sync for ToolCallDecision
impl Unpin for ToolCallDecision
impl UnsafeUnpin for ToolCallDecision
impl UnwindSafe for ToolCallDecision
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