pub struct State {
pub turn_count: u32,
pub tool_signals: Option<ToolSignals>,
pub extra: HashMap<String, StateValue>,
}Expand description
Routing facts accumulated across one session’s algorithm runs.
Fields§
§turn_count: u32Number of turns processed for this session.
tool_signals: Option<ToolSignals>Tool-result signals for the current request, set by the tool-signal
processor. None until it runs or when the request has no tool activity,
so routers must treat absence as “no signal yet”.
extra: HashMap<String, StateValue>Algorithm-specific state keyed by stable internal names.
Trait Implementations§
Source§impl Classifier<State> for LlmTaskClassifier
impl Classifier<State> for LlmTaskClassifier
Source§fn routing_tier(&self, selected_model: &str) -> Option<&'static str>
fn routing_tier(&self, selected_model: &str) -> Option<&'static str>
Stable tier represented by
selected_model, when this classifier defines one.Source§fn score<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
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 State,
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
Source§impl Classifier<State> for StageClassifier
impl Classifier<State> for StageClassifier
Source§fn routing_tier(&self, selected_model: &str) -> Option<&'static str>
fn routing_tier(&self, selected_model: &str) -> Option<&'static str>
Stable tier represented by
selected_model, when this classifier defines one.Source§fn score<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
state: &'life1 mut State,
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 State,
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 Freeze for State
impl RefUnwindSafe for State
impl Send for State
impl Sync for State
impl Unpin for State
impl UnsafeUnpin for State
impl UnwindSafe for State
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