pub struct SubagentGate { /* private fields */ }Expand description
Classifies delegated work from its parent-supplied prompt and abstains otherwise.
The inner classifier receives a prompt-only request clone. The original request remains unchanged for the selected child model.
Implementations§
Source§impl SubagentGate
impl SubagentGate
Sourcepub fn new(inner: Arc<dyn Classifier>) -> Self
pub fn new(inner: Arc<dyn Classifier>) -> Self
Wraps inner with delegated-work detection.
Trait Implementations§
Source§impl Classifier for SubagentGate
impl Classifier for SubagentGate
Source§fn score<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
request: &'life2 mut Request,
driver: &'life3 Driver,
) -> Pin<Box<dyn Future<Output = Result<(Classification, Option<Response>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn score<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
request: &'life2 mut Request,
driver: &'life3 Driver,
) -> Pin<Box<dyn Future<Output = Result<(Classification, Option<Response>)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Score the classifier’s targets given the current state and request. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SubagentGate
impl !UnwindSafe for SubagentGate
impl Freeze for SubagentGate
impl Send for SubagentGate
impl Sync for SubagentGate
impl Unpin for SubagentGate
impl UnsafeUnpin for SubagentGate
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