pub enum ReminderTrigger {
Always,
ResultContains(String),
InputMatches {
field: String,
pattern: String,
},
Probabilistic(f64),
}Expand description
Determines when a tool reminder should be shown.
Variants§
Always
Show after every successful execution.
ResultContains(String)
Show when the result output contains the specified text.
InputMatches
Show when an input field matches a pattern.
Probabilistic(f64)
Show randomly with the given probability (0.0 - 1.0).
Implementations§
Source§impl ReminderTrigger
impl ReminderTrigger
Sourcepub fn should_trigger(&self, input: &Value, result: &ToolResult) -> bool
pub fn should_trigger(&self, input: &Value, result: &ToolResult) -> bool
Checks if this trigger should fire given the tool execution context.
Trait Implementations§
Source§impl Clone for ReminderTrigger
impl Clone for ReminderTrigger
Source§fn clone(&self) -> ReminderTrigger
fn clone(&self) -> ReminderTrigger
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 moreAuto Trait Implementations§
impl Freeze for ReminderTrigger
impl RefUnwindSafe for ReminderTrigger
impl Send for ReminderTrigger
impl Sync for ReminderTrigger
impl Unpin for ReminderTrigger
impl UnwindSafe for ReminderTrigger
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