pub struct NoopModelRuntime;Expand description
A ModelRuntimePort that never has anything running.
For callers with no shared ProcessManager
to point at — the CLI’s single-shot commands, whose is_serving checks
against a runtime scoped to that one process invocation would report
“nothing running” regardless, since nothing was started in it. Making that
explicit here is more honest than wiring in a real runner that can only
ever agree.
Trait Implementations§
Source§impl Debug for NoopModelRuntime
impl Debug for NoopModelRuntime
Source§impl Default for NoopModelRuntime
impl Default for NoopModelRuntime
Source§fn default() -> NoopModelRuntime
fn default() -> NoopModelRuntime
Returns the “default value” for a type. Read more
Source§impl ModelRuntimePort for NoopModelRuntime
impl ModelRuntimePort for NoopModelRuntime
Source§fn ensure_model_running<'life0, 'life1, 'async_trait>(
&'life0 self,
_model_name: &'life1 str,
_num_ctx: Option<u64>,
_default_ctx: u64,
) -> Pin<Box<dyn Future<Output = Result<RunningTarget, ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ensure_model_running<'life0, 'life1, 'async_trait>(
&'life0 self,
_model_name: &'life1 str,
_num_ctx: Option<u64>,
_default_ctx: u64,
) -> Pin<Box<dyn Future<Output = Result<RunningTarget, ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Ensure a model is running and ready to serve requests. Read more
Source§fn current_model<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<RunningTarget>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn current_model<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<RunningTarget>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get information about the currently running model, if any. Read more
Source§fn stop_current<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn stop_current<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Stop the currently running model. Read more
Source§fn ensure_model_running_with<'life0, 'life1, 'async_trait>(
&'life0 self,
model_name: &'life1 str,
num_ctx: Option<u64>,
default_ctx: u64,
overrides: LaunchOverrides,
) -> Pin<Box<dyn Future<Output = Result<RunningTarget, ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ensure_model_running_with<'life0, 'life1, 'async_trait>(
&'life0 self,
model_name: &'life1 str,
num_ctx: Option<u64>,
default_ctx: u64,
overrides: LaunchOverrides,
) -> Pin<Box<dyn Future<Output = Result<RunningTarget, ModelRuntimeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Same as
Self::ensure_model_running, but with per-call overrides
layered on top of whatever standing configuration the implementation
was built with. Read moreSource§fn list_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ProcessHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_running<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Vec<ProcessHandle>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Every llama-server process this runtime currently owns. Read more
Auto Trait Implementations§
impl Freeze for NoopModelRuntime
impl RefUnwindSafe for NoopModelRuntime
impl Send for NoopModelRuntime
impl Sync for NoopModelRuntime
impl Unpin for NoopModelRuntime
impl UnsafeUnpin for NoopModelRuntime
impl UnwindSafe for NoopModelRuntime
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