pub struct RemoteLlmClient { /* private fields */ }Expand description
LlmClient impl backed by a subprocess plugin’s stdio bridge.
Implementations§
Trait Implementations§
Source§impl LlmClient for RemoteLlmClient
impl LlmClient for RemoteLlmClient
Source§fn provider(&self) -> &str
fn provider(&self) -> &str
Short identifier of the provider (“minimax”, “openai”, “stub”, …).
Used as a Prometheus label; must be low-cardinality.
fn model_id(&self) -> &str
fn chat<'life0, 'async_trait>(
&'life0 self,
req: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<ChatResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn stream<'a, 'async_trait>(
&'a self,
req: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'a, Result<StreamChunk>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
fn stream<'a, 'async_trait>(
&'a self,
req: ChatRequest,
) -> Pin<Box<dyn Future<Output = Result<BoxStream<'a, Result<StreamChunk>>>> + Send + 'async_trait>>where
Self: 'async_trait,
'a: 'async_trait,
Incremental response stream. Default implementation delegates to
chat() and emits a single TextDelta (or ToolCall* triples)
followed by Usage + End. Providers that speak SSE override this
to stream real token-level deltas.Source§fn embed<'life0, 'life1, 'async_trait>(
&'life0 self,
_texts: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn embed<'life0, 'life1, 'async_trait>(
&'life0 self,
_texts: &'life1 [String],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Compute dense vector embeddings for a batch of input texts.
Default returns an error — providers that do not expose an embedding
endpoint (or where it is not yet wired) opt out by leaving this default.
Auto Trait Implementations§
impl !RefUnwindSafe for RemoteLlmClient
impl !UnwindSafe for RemoteLlmClient
impl Freeze for RemoteLlmClient
impl Send for RemoteLlmClient
impl Sync for RemoteLlmClient
impl Unpin for RemoteLlmClient
impl UnsafeUnpin for RemoteLlmClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more