pub struct ImageEmbeddingModel<T = Client> { /* private fields */ }Expand description
Cohere embed-english-v3.0 image embedding model.
Cohere Embed v3 accepts one image per request, so batch calls are sent as ordered individual requests.
Trait Implementations§
Source§impl<T> Clone for ImageEmbeddingModel<T>where
T: Clone,
impl<T> Clone for ImageEmbeddingModel<T>where
T: Clone,
Source§fn clone(&self) -> ImageEmbeddingModel<T>
fn clone(&self) -> ImageEmbeddingModel<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T> ImageEmbeddingModel for ImageEmbeddingModel<T>
impl<T> ImageEmbeddingModel for ImageEmbeddingModel<T>
Source§const MAX_DOCUMENTS: usize = 1
const MAX_DOCUMENTS: usize = 1
The maximum number of images the provider accepts in one request.
Source§async fn embed_images(
&self,
images: impl IntoIterator<Item = Vec<u8>> + WasmCompatSend,
) -> Result<Vec<Embedding>, EmbeddingError>
async fn embed_images( &self, images: impl IntoIterator<Item = Vec<u8>> + WasmCompatSend, ) -> Result<Vec<Embedding>, EmbeddingError>
Embed a batch of images from their encoded file bytes. Read more
Source§fn embed_image<'a>(
&'a self,
bytes: &'a [u8],
) -> impl Future<Output = Result<Embedding, EmbeddingError>> + WasmCompatSend
fn embed_image<'a>( &'a self, bytes: &'a [u8], ) -> impl Future<Output = Result<Embedding, EmbeddingError>> + WasmCompatSend
Embed a single image from its encoded file bytes.
Auto Trait Implementations§
impl<T> Freeze for ImageEmbeddingModel<T>where
T: Freeze,
impl<T> RefUnwindSafe for ImageEmbeddingModel<T>where
T: RefUnwindSafe,
impl<T> Send for ImageEmbeddingModel<T>where
T: Send,
impl<T> Sync for ImageEmbeddingModel<T>where
T: Sync,
impl<T> Unpin for ImageEmbeddingModel<T>where
T: Unpin,
impl<T> UnsafeUnpin for ImageEmbeddingModel<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for ImageEmbeddingModel<T>where
T: UnwindSafe,
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