pub struct LocalProvider { /* private fields */ }Expand description
Local ONNX provider, backed by a model cache directory.
Implementations§
Trait Implementations§
Source§impl InferenceProvider for LocalProvider
impl InferenceProvider for LocalProvider
Source§fn infer_batch<'life0, 'async_trait>(
&'life0 self,
request: InferenceRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn infer_batch<'life0, 'async_trait>(
&'life0 self,
request: InferenceRequest,
) -> Pin<Box<dyn Future<Output = Result<InferenceResponse, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Run one batch of inputs through the model. Read more
Source§fn name(&self) -> &'static str
fn name(&self) -> &'static str
Stable backend-kind identity for logging and the
laminar.ai_calls
log (e.g. anthropic, openai, local). Constant per implementor.Source§fn intrinsic_labels(&self, model: &str) -> Option<Vec<String>>
fn intrinsic_labels(&self, model: &str) -> Option<Vec<String>>
Classifier labels intrinsic to a model, discovered from its own metadata.
Returns
None for backends that have none (remote providers, embedding
models). A local classifier returns its config.json id2label once the
model is on disk — the seam that lets a lazily downloaded classifier score
without the labels having been known at startup. The default is None.Auto Trait Implementations§
impl !Freeze for LocalProvider
impl !RefUnwindSafe for LocalProvider
impl Send for LocalProvider
impl Sync for LocalProvider
impl Unpin for LocalProvider
impl UnsafeUnpin for LocalProvider
impl !UnwindSafe for LocalProvider
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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