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
Source§fn tracks_answers(&self) -> bool
fn tracks_answers(&self) -> bool
Whether a stateful composition should request served-answer reports.
Source§fn observe_answer(&self, _state: &mut State, _answer: AnswerSummary)
fn observe_answer(&self, _state: &mut State, _answer: AnswerSummary)
Folds the answer the host served for this session into the composition’s state.
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