pub struct BehavioralSignal {
pub phase: RouterPhase,
pub recent_tool_count: usize,
pub phase_transitions: usize,
pub is_question: bool,
}Expand description
Signals derived from recent conversation behavior.
Fields§
§phase: RouterPhase§recent_tool_count: usize§phase_transitions: usize§is_question: boolImplementations§
Source§impl BehavioralSignal
impl BehavioralSignal
Sourcepub fn extract(
messages: &[Message],
history: &[RoutingDecision],
) -> BehavioralSignal
pub fn extract( messages: &[Message], history: &[RoutingDecision], ) -> BehavioralSignal
Extract behavioral signals from context and decision history.
Sourcepub fn count_recent_tools(messages: &[Message], n: usize) -> usize
pub fn count_recent_tools(messages: &[Message], n: usize) -> usize
Count tool-result messages in the last n messages.
Sourcepub fn count_phase_transitions(history: &[RoutingDecision]) -> usize
pub fn count_phase_transitions(history: &[RoutingDecision]) -> usize
Count phase changes in the decision history.
Sourcepub fn normalized(&self) -> f64
pub fn normalized(&self) -> f64
Normalize to [0, 1] for scoring.
Trait Implementations§
Source§impl Clone for BehavioralSignal
impl Clone for BehavioralSignal
Source§fn clone(&self) -> BehavioralSignal
fn clone(&self) -> BehavioralSignal
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BehavioralSignal
impl Debug for BehavioralSignal
Source§impl Default for BehavioralSignal
impl Default for BehavioralSignal
Source§fn default() -> BehavioralSignal
fn default() -> BehavioralSignal
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BehavioralSignal
impl RefUnwindSafe for BehavioralSignal
impl Send for BehavioralSignal
impl Sync for BehavioralSignal
impl Unpin for BehavioralSignal
impl UnsafeUnpin for BehavioralSignal
impl UnwindSafe for BehavioralSignal
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