pub struct CohereEmbeddings { /* private fields */ }Expand description
Embeddings backed by the Cohere Embed API.
Supports all Cohere embedding models including embed-english-v3.0 (1024-dim)
and embed-multilingual-v3.0 (1024-dim).
Implementations§
Source§impl CohereEmbeddings
impl CohereEmbeddings
pub fn new(config: CohereEmbeddingsConfig) -> Self
pub fn with_client(config: CohereEmbeddingsConfig, client: Client) -> Self
Trait Implementations§
Source§impl Embeddings for CohereEmbeddings
impl Embeddings for CohereEmbeddings
Source§fn embed_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
texts: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn embed_documents<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
texts: &'life1 [&'life2 str],
) -> Pin<Box<dyn Future<Output = Result<Vec<Vec<f32>>, SynapticError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Embed multiple texts (for batch document embedding).
Auto Trait Implementations§
impl Freeze for CohereEmbeddings
impl !RefUnwindSafe for CohereEmbeddings
impl Send for CohereEmbeddings
impl Sync for CohereEmbeddings
impl Unpin for CohereEmbeddings
impl UnsafeUnpin for CohereEmbeddings
impl !UnwindSafe for CohereEmbeddings
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