pub enum InvalidToolCallAction {
Fail,
Retry {
feedback: String,
},
Repair {
tool_name: String,
},
Skip {
reason: String,
},
Stop {
reason: String,
},
}Expand description
Action for invalid-tool-call hooks and manual invalid-call resolution.
Variants§
Fail
Preserve fail-fast behavior.
Retry
Retry the model with corrective feedback.
Repair
Repair the emitted tool name.
Skip
Treat the invalid call as skipped.
Stop
Stop the run.
Implementations§
Source§impl InvalidToolCallAction
impl InvalidToolCallAction
Sourcepub fn retry(feedback: impl Into<String>) -> Self
pub fn retry(feedback: impl Into<String>) -> Self
Creates an action that retries the model with corrective feedback.
Sourcepub fn repair(tool_name: impl Into<String>) -> Self
pub fn repair(tool_name: impl Into<String>) -> Self
Creates an action that replaces the invalid tool name.
Trait Implementations§
Source§impl Clone for InvalidToolCallAction
impl Clone for InvalidToolCallAction
Source§fn clone(&self) -> InvalidToolCallAction
fn clone(&self) -> InvalidToolCallAction
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 moreSource§impl Debug for InvalidToolCallAction
impl Debug for InvalidToolCallAction
impl Eq for InvalidToolCallAction
Source§impl PartialEq for InvalidToolCallAction
impl PartialEq for InvalidToolCallAction
impl StructuralPartialEq for InvalidToolCallAction
Auto Trait Implementations§
impl Freeze for InvalidToolCallAction
impl RefUnwindSafe for InvalidToolCallAction
impl Send for InvalidToolCallAction
impl Sync for InvalidToolCallAction
impl Unpin for InvalidToolCallAction
impl UnsafeUnpin for InvalidToolCallAction
impl UnwindSafe for InvalidToolCallAction
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
impl<T> CloneDebuggableStorage for Twhere
T: DebuggableStorage + Clone,
fn clone_storage(&self) -> Box<dyn CloneDebuggableStorage>
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> CloneableStorage for T
impl<T> CloneableStorage for T
fn clone_storage(&self) -> Box<dyn CloneableStorage>
impl<T> DebuggableStorage for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.