pub struct RoutingTextModel { /* private fields */ }Expand description
Dispatches by Prompt::tier to the adapter a venture configured for
that tier, so venture code holds one Arc<dyn TextModel> and never
matches on the tier or the vendor itself (ADR 0002). The router lives
above the adapters, in core — the same place
RoutingPush does, and for the same reason
(ADR 0015).
This is the seam that lets a venture put drafting on one vendor and an independent judge on another without either module knowing.
A tier with no adapter is TextModelError::NotConfigured —
deliberately not TextModelError::Rejected: nothing is wrong with the
prompt, the venture simply did not wire that tier.
Implementations§
Source§impl RoutingTextModel
impl RoutingTextModel
Sourcepub fn fast(self, model: Arc<dyn TextModel>) -> Self
pub fn fast(self, model: Arc<dyn TextModel>) -> Self
The adapter for ModelTier::Fast.
Sourcepub fn strong(self, model: Arc<dyn TextModel>) -> Self
pub fn strong(self, model: Arc<dyn TextModel>) -> Self
The adapter for ModelTier::Strong.
Trait Implementations§
Source§impl Clone for RoutingTextModel
impl Clone for RoutingTextModel
Source§impl Debug for RoutingTextModel
impl Debug for RoutingTextModel
Source§impl Default for RoutingTextModel
impl Default for RoutingTextModel
Source§impl TextModel for RoutingTextModel
impl TextModel for RoutingTextModel
Auto Trait Implementations§
impl !RefUnwindSafe for RoutingTextModel
impl !UnwindSafe for RoutingTextModel
impl Freeze for RoutingTextModel
impl Send for RoutingTextModel
impl Sync for RoutingTextModel
impl Unpin for RoutingTextModel
impl UnsafeUnpin for RoutingTextModel
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