pub enum ModelSelectionAction {
Continue,
Select(ModelRef),
Stop(String),
}Expand description
Action for model-selection hooks.
Variants§
Continue
Keep the candidate supplied to this hook.
Select(ModelRef)
Replace the candidate and pass it to later hooks: the label of a model registered in the agent’s handler table.
Stop(String)
Stop the run before request preparation or model execution.
Implementations§
Source§impl ModelSelectionAction
impl ModelSelectionAction
Sourcepub fn continue_run() -> Self
pub fn continue_run() -> Self
Keeps the current model candidate.
Sourcepub fn stop(reason: impl Into<String>) -> Self
pub fn stop(reason: impl Into<String>) -> Self
Stops the run before the pending model attempt.
A selection stop happens before the attempt is issued, so it does not
advance ModelSelection::previous_model.
Trait Implementations§
Source§impl Clone for ModelSelectionAction
impl Clone for ModelSelectionAction
Auto Trait Implementations§
impl Freeze for ModelSelectionAction
impl RefUnwindSafe for ModelSelectionAction
impl Send for ModelSelectionAction
impl Sync for ModelSelectionAction
impl Unpin for ModelSelectionAction
impl UnsafeUnpin for ModelSelectionAction
impl UnwindSafe for ModelSelectionAction
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