pub struct LmStudioAdapter<'runtime> {
pub binary: PathBuf,
pub trusted_executables: Vec<PathBuf>,
pub http: &'runtime dyn Transport,
pub probe: &'runtime dyn ProcessProbe,
pub commands: &'runtime dyn CommandRunner,
pub token: Option<String>,
}Fields§
§binary: PathBuf§trusted_executables: Vec<PathBuf>§http: &'runtime dyn Transport§probe: &'runtime dyn ProcessProbe§commands: &'runtime dyn CommandRunner§token: Option<String>Trait Implementations§
Source§impl BackendAdapter for LmStudioAdapter<'_>
impl BackendAdapter for LmStudioAdapter<'_>
fn chat<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
handle: &'life1 ServerState,
input: &'life2 ChatInput,
cancel: &'life3 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ChatResult, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn embed<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
handle: &'life1 ServerState,
model: &'life2 str,
inputs: &'life3 [String],
cancel: &'life4 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<EmbedResult, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn name(&self) -> &'static str
fn trusts(&self, identity: &ProcessIdentity) -> bool
fn serve<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 ServeRequest,
cancel: &'life2 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ServerState, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn ready<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
input: &'life1 ServeRequest,
cancel: &'life2 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<(), BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn stop<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
handle: &'life1 ServerState,
_cancel: &'life2 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<(), BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn attach_only<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_request: &'life1 ServeRequest,
_cancel: &'life2 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<ServerState, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn can_embed(&self) -> bool
fn can_stream(&self) -> bool
fn chat_stream<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
handle: &'life1 ServerState,
input: &'life2 ChatInput,
cancel: &'life3 CancellationToken,
on_delta: &'life4 mut (dyn for<'chunk> FnMut(&'chunk str) + Send),
) -> Pin<Box<dyn Future<Output = Result<ChatResult, BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn ready_handle<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
request: &'life1 ServeRequest,
_handle: &'life2 ServerState,
cancel: &'life3 CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<(), BackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Auto Trait Implementations§
impl<'runtime> !RefUnwindSafe for LmStudioAdapter<'runtime>
impl<'runtime> !UnwindSafe for LmStudioAdapter<'runtime>
impl<'runtime> Forget for LmStudioAdapter<'runtime>
impl<'runtime> Freeze for LmStudioAdapter<'runtime>
impl<'runtime> Send for LmStudioAdapter<'runtime>
impl<'runtime> Sync for LmStudioAdapter<'runtime>
impl<'runtime> Unpin for LmStudioAdapter<'runtime>
impl<'runtime> UnsafeUnpin for LmStudioAdapter<'runtime>
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