Struct LlmRegistry
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§
§impl LlmRegistry
impl LlmRegistry
pub fn new() -> LlmRegistry
pub fn new() -> LlmRegistry
Create a new empty LLM registry.
pub 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§
§impl Default for LlmRegistry
impl Default for LlmRegistry
§fn default() -> LlmRegistry
fn default() -> LlmRegistry
Returns the “default value” for a type. Read more
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