pub struct OllamaRuntime { /* private fields */ }Expand description
Shared Ollama plus execution guard; auto_pull / mode control Self::ensure only.
Implementations§
Source§impl OllamaRuntime
impl OllamaRuntime
pub async fn new(config: RuntimeConfig) -> Result<Self>
pub fn client(&self) -> &Ollama
pub fn guard(&self) -> &ExecutionGuard
pub fn auto_pull(&self) -> bool
pub fn mode(&self) -> RuntimeMode
pub async fn ensure(&self, model: &str) -> Result<()>
pub async fn call<F, Fut, T>(&self, f: F) -> Result<T>
Auto Trait Implementations§
impl Freeze for OllamaRuntime
impl !RefUnwindSafe for OllamaRuntime
impl Send for OllamaRuntime
impl Sync for OllamaRuntime
impl Unpin for OllamaRuntime
impl UnsafeUnpin for OllamaRuntime
impl !UnwindSafe for OllamaRuntime
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