pub struct ProviderRouter { /* private fields */ }Expand description
Routes LLM requests across multiple providers.
Implementations§
Source§impl ProviderRouter
impl ProviderRouter
Sourcepub fn new(strategy: RoutingStrategy) -> Self
pub fn new(strategy: RoutingStrategy) -> Self
Create a new router with the given strategy.
Sourcepub fn with_provider(self, entry: ProviderEntry) -> Self
pub fn with_provider(self, entry: ProviderEntry) -> Self
Add a provider to the router.
Sourcepub fn provider_count(&self) -> usize
pub fn provider_count(&self) -> usize
Returns the number of registered providers.
Trait Implementations§
Source§impl Debug for ProviderRouter
impl Debug for ProviderRouter
Source§impl LlmPort for ProviderRouter
impl LlmPort for ProviderRouter
Source§fn capabilities(&self) -> LlmCapabilities
fn capabilities(&self) -> LlmCapabilities
Runtime capability declaration for dispatch decisions.
Auto Trait Implementations§
impl !Freeze for ProviderRouter
impl !RefUnwindSafe for ProviderRouter
impl Send for ProviderRouter
impl Sync for ProviderRouter
impl Unpin for ProviderRouter
impl UnsafeUnpin for ProviderRouter
impl !UnwindSafe for ProviderRouter
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