pub struct HttpEmbeddingProvider { /* private fields */ }Expand description
HTTP-based embedding provider.
Currently requires an external HTTP client feature to function. The structure and configuration are fully usable for setup and validation.
Implementations§
Source§impl HttpEmbeddingProvider
impl HttpEmbeddingProvider
Sourcepub fn new(config: HttpEmbeddingConfig) -> Self
pub fn new(config: HttpEmbeddingConfig) -> Self
Create a new HTTP embedding provider with the given configuration.
Sourcepub fn config(&self) -> &HttpEmbeddingConfig
pub fn config(&self) -> &HttpEmbeddingConfig
Get a reference to the provider’s configuration.
Trait Implementations§
Source§impl AsyncEmbeddingProvider for HttpEmbeddingProvider
impl AsyncEmbeddingProvider for HttpEmbeddingProvider
Source§async fn embed(&self, _text: &str) -> MenteResult<Vec<f32>>
async fn embed(&self, _text: &str) -> MenteResult<Vec<f32>>
Generate an embedding vector for a single text.
Source§async fn embed_batch(&self, _texts: &[&str]) -> MenteResult<Vec<Vec<f32>>>
async fn embed_batch(&self, _texts: &[&str]) -> MenteResult<Vec<Vec<f32>>>
Generate embedding vectors for a batch of texts.
Source§fn dimensions(&self) -> usize
fn dimensions(&self) -> usize
The dimensionality of the embedding vectors produced by this provider.
Source§fn model_name(&self) -> &str
fn model_name(&self) -> &str
The name of the model used by this provider.
Source§impl EmbeddingProvider for HttpEmbeddingProvider
impl EmbeddingProvider for HttpEmbeddingProvider
Source§fn embed(&self, text: &str) -> MenteResult<Vec<f32>>
fn embed(&self, text: &str) -> MenteResult<Vec<f32>>
Generate an embedding vector for a single text.
Source§fn embed_batch(&self, texts: &[&str]) -> MenteResult<Vec<Vec<f32>>>
fn embed_batch(&self, texts: &[&str]) -> MenteResult<Vec<Vec<f32>>>
Generate embedding vectors for a batch of texts.
Source§fn dimensions(&self) -> usize
fn dimensions(&self) -> usize
The dimensionality of the embedding vectors produced by this provider.
Source§fn model_name(&self) -> &str
fn model_name(&self) -> &str
The name of the model used by this provider.
Auto Trait Implementations§
impl Freeze for HttpEmbeddingProvider
impl RefUnwindSafe for HttpEmbeddingProvider
impl Send for HttpEmbeddingProvider
impl Sync for HttpEmbeddingProvider
impl Unpin for HttpEmbeddingProvider
impl UnsafeUnpin for HttpEmbeddingProvider
impl UnwindSafe for HttpEmbeddingProvider
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