pub struct ProviderRegistry { /* private fields */ }Expand description
Re-export provider registry so consumers can resolve provider names from model identifiers. Registry of available LLM providers
Implementations§
Source§impl ProviderRegistry
impl ProviderRegistry
Sourcepub fn new() -> ProviderRegistry
pub fn new() -> ProviderRegistry
Create a new provider registry with default providers
Sourcepub fn all(&self) -> &[ProviderSpec]
pub fn all(&self) -> &[ProviderSpec]
Get all provider specs
Sourcepub fn find_by_model(&self, model: &str) -> Option<&ProviderSpec>
pub fn find_by_model(&self, model: &str) -> Option<&ProviderSpec>
Find a provider by model name (case-insensitive keyword matching)
Sourcepub fn find_by_name(&self, name: &str) -> Option<&ProviderSpec>
pub fn find_by_name(&self, name: &str) -> Option<&ProviderSpec>
Find a provider by config field name
Trait Implementations§
Source§impl Default for ProviderRegistry
impl Default for ProviderRegistry
Source§fn default() -> ProviderRegistry
fn default() -> ProviderRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ProviderRegistry
impl RefUnwindSafe for ProviderRegistry
impl Send for ProviderRegistry
impl Sync for ProviderRegistry
impl Unpin for ProviderRegistry
impl UnsafeUnpin for ProviderRegistry
impl UnwindSafe for ProviderRegistry
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