pub struct SubagentGate<S> { /* 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<S> SubagentGate<S>
impl<S> SubagentGate<S>
Sourcepub fn new(inner: Arc<dyn Classifier<S>>) -> Self
pub fn new(inner: Arc<dyn Classifier<S>>) -> Self
Wraps inner with delegated-work detection.
Trait Implementations§
Source§impl<S> Classifier<S> for SubagentGate<S>where
S: Send + 'static,
impl<S> Classifier<S> for SubagentGate<S>where
S: Send + 'static,
Source§fn routing_tier(&self, selected_model_id: &ModelId) -> Option<&'static str>
fn routing_tier(&self, selected_model_id: &ModelId) -> Option<&'static str>
Stable tier represented by
selected_model_id, when this classifier defines one.Source§fn score<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 mut S,
request: &'life2 mut Request,
driver: Option<&'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 S,
request: &'life2 mut Request,
driver: Option<&'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<S> Freeze for SubagentGate<S>
impl<S> !RefUnwindSafe for SubagentGate<S>
impl<S> Send for SubagentGate<S>
impl<S> Sync for SubagentGate<S>
impl<S> Unpin for SubagentGate<S>
impl<S> UnsafeUnpin for SubagentGate<S>
impl<S> !UnwindSafe for SubagentGate<S>
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