pub struct LlmModelExecutor { /* private fields */ }Expand description
The default ModelExecutor, wrapping a general salvor_llm::Client.
This is not consumer-specific: it wraps the general model transport, so any
host that reaches a provider through salvor-llm gets a working executor by
constructing a Client and handing it here. salvor serve builds one from
its environment client-construction path.
Implementations§
Trait Implementations§
Source§impl ModelExecutor for LlmModelExecutor
impl ModelExecutor for LlmModelExecutor
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
request: Value,
) -> Pin<Box<dyn Future<Output = Result<MessageResponse, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
request: Value,
) -> Pin<Box<dyn Future<Output = Result<MessageResponse, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Perform a single (non-streaming) model call and return the response. Read more
Source§fn open_stream<'life0, 'async_trait>(
&'life0 self,
request: Value,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ModelStream>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn open_stream<'life0, 'async_trait>(
&'life0 self,
request: Value,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn ModelStream>, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Open a streaming model call, returning a
ModelStream of provider
events the server pumps for the live ticker. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for LlmModelExecutor
impl !UnwindSafe for LlmModelExecutor
impl Freeze for LlmModelExecutor
impl Send for LlmModelExecutor
impl Sync for LlmModelExecutor
impl Unpin for LlmModelExecutor
impl UnsafeUnpin for LlmModelExecutor
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