pub struct LlmServerHandle { /* private fields */ }Expand description
Lifecycle manager for the local llama-server subprocess. Cloneable
handle around shared interior state; one instance lives on FlowApp.
Implementations§
Source§impl LlmServerHandle
impl LlmServerHandle
pub fn new() -> Self
Sourcepub async fn start(
&self,
binary: PathBuf,
model_path: PathBuf,
params: LlamaParams,
) -> Result<String, String>
pub async fn start( &self, binary: PathBuf, model_path: PathBuf, params: LlamaParams, ) -> Result<String, String>
Spawn llama-server for model_path and wait until it answers
/v1/models. Returns the managed endpoint origin (http://127.0.0.1:<port>)
on success. If a server is already running it is stopped first.
Sourcepub fn status(&self) -> LlmServerStatus
pub fn status(&self) -> LlmServerStatus
Current status snapshot. Does not probe the network - running
reflects whether we hold a live child handle.
Trait Implementations§
Source§impl Clone for LlmServerHandle
impl Clone for LlmServerHandle
Source§fn clone(&self) -> LlmServerHandle
fn clone(&self) -> LlmServerHandle
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 moreAuto Trait Implementations§
impl Freeze for LlmServerHandle
impl RefUnwindSafe for LlmServerHandle
impl Send for LlmServerHandle
impl Sync for LlmServerHandle
impl Unpin for LlmServerHandle
impl UnsafeUnpin for LlmServerHandle
impl UnwindSafe for LlmServerHandle
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