pub struct LlmRegistry { /* private fields */ }Expand description
Registry that maps model name patterns to LLM factory functions.
Patterns are matched by prefix: a pattern "gemini" matches model names
"gemini-2.5-flash", "gemini-2.0-pro", etc.
Implementations§
Source§impl LlmRegistry
impl LlmRegistry
Sourcepub fn register(
&mut self,
pattern: impl Into<String>,
factory: impl Fn(&str) -> Arc<dyn BaseLlm> + Send + Sync + 'static,
)
pub fn register( &mut self, pattern: impl Into<String>, factory: impl Fn(&str) -> Arc<dyn BaseLlm> + Send + Sync + 'static, )
Register a factory for model names matching the given pattern (prefix match).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LlmRegistry
impl !RefUnwindSafe for LlmRegistry
impl Send for LlmRegistry
impl Sync for LlmRegistry
impl Unpin for LlmRegistry
impl !UnwindSafe for LlmRegistry
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