pub struct MistralNativeEmbeddingProvider { /* private fields */ }Expand description
Calls api.mistral.ai/v1/embeddings using the mistral-embed model.
- Dimension: 1024
- Context window: 8192 tokens
- EU-hosted, GDPR-compliant
Implementations§
Trait Implementations§
Source§impl EmbeddingProvider for MistralNativeEmbeddingProvider
impl EmbeddingProvider for MistralNativeEmbeddingProvider
Source§fn embed_batch(&self, texts: &[&str]) -> Result<Vec<Embedding>, EmbeddingError>
fn embed_batch(&self, texts: &[&str]) -> Result<Vec<Embedding>, EmbeddingError>
Override the default batch implementation to call the API once for all texts.
fn dimensions(&self) -> usize
fn embed(&self, text: &str) -> Result<Embedding, EmbeddingError>
Auto Trait Implementations§
impl Freeze for MistralNativeEmbeddingProvider
impl !RefUnwindSafe for MistralNativeEmbeddingProvider
impl Send for MistralNativeEmbeddingProvider
impl Sync for MistralNativeEmbeddingProvider
impl Unpin for MistralNativeEmbeddingProvider
impl UnsafeUnpin for MistralNativeEmbeddingProvider
impl !UnwindSafe for MistralNativeEmbeddingProvider
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