pub struct AdaptiveRouter { /* private fields */ }Expand description
Adaptive router with three-phase model selection.
Implementations§
Source§impl AdaptiveRouter
impl AdaptiveRouter
pub fn new(hw: HardwareInfo, config: RoutingConfig) -> Self
pub fn with_default_config(hw: HardwareInfo) -> Self
Sourcepub fn route(
&self,
prompt: &str,
registry: &UnifiedRegistry,
tracker: &OutcomeTracker,
) -> AdaptiveRoutingDecision
pub fn route( &self, prompt: &str, registry: &UnifiedRegistry, tracker: &OutcomeTracker, ) -> AdaptiveRoutingDecision
Route a generation request to the best model.
Sourcepub fn route_embedding(&self, registry: &UnifiedRegistry) -> String
pub fn route_embedding(&self, registry: &UnifiedRegistry) -> String
Route to the best embedding model.
Sourcepub fn route_small(&self, registry: &UnifiedRegistry) -> String
pub fn route_small(&self, registry: &UnifiedRegistry) -> String
Route to the smallest available model (for classification).
Auto Trait Implementations§
impl Freeze for AdaptiveRouter
impl RefUnwindSafe for AdaptiveRouter
impl Send for AdaptiveRouter
impl Sync for AdaptiveRouter
impl Unpin for AdaptiveRouter
impl UnsafeUnpin for AdaptiveRouter
impl UnwindSafe for AdaptiveRouter
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more