#[non_exhaustive]pub enum AfterTool {
Keep,
Replace(ToolResult),
Append(String),
Abort(String),
}Expand description
What Hooks::after_tool decides for a finished tool call.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Keep
The model reads what the tool returned.
Replace(ToolResult)
The model reads this instead.
Append(String)
The model reads what the tool returned, and the conversation gains this context as a durable block after the turn’s results.
Abort(String)
End the run with this reason as its error.
Trait Implementations§
Auto Trait Implementations§
impl Forget for AfterTool
impl Freeze for AfterTool
impl Move for AfterTool
impl RefUnwindSafe for AfterTool
impl Send for AfterTool
impl Sync for AfterTool
impl Unpin for AfterTool
impl UnsafeUnpin for AfterTool
impl UnwindSafe for AfterTool
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