pub struct OllamaFactory;Expand description
Factory for creating OllamaProvider instances from configuration.
Register this factory with the global registry to enable config-driven provider instantiation:
use llm_stack::ProviderRegistry;
use llm_stack_ollama::OllamaFactory;
ProviderRegistry::global().register(Box::new(OllamaFactory));§Configuration
| Field | Required | Description |
|---|---|---|
provider | Yes | Must be "ollama" |
api_key | No | Not used (Ollama doesn’t require auth) |
model | Yes | Model identifier (e.g., "llama3.2") |
base_url | No | Custom API endpoint (default: http://localhost:11434) |
timeout | No | Request timeout |
Trait Implementations§
Source§impl Clone for OllamaFactory
impl Clone for OllamaFactory
Source§fn clone(&self) -> OllamaFactory
fn clone(&self) -> OllamaFactory
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OllamaFactory
impl Debug for OllamaFactory
Source§impl Default for OllamaFactory
impl Default for OllamaFactory
Source§fn default() -> OllamaFactory
fn default() -> OllamaFactory
Returns the “default value” for a type. Read more
Source§impl ProviderFactory for OllamaFactory
impl ProviderFactory for OllamaFactory
impl Copy for OllamaFactory
Auto Trait Implementations§
impl Freeze for OllamaFactory
impl RefUnwindSafe for OllamaFactory
impl Send for OllamaFactory
impl Sync for OllamaFactory
impl Unpin for OllamaFactory
impl UnwindSafe for OllamaFactory
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