pub struct ImageEmbedding;Expand description
Embedding a batch of images from their encoded file bytes.
Trait Implementations§
Source§impl Clone for ImageEmbedding
impl Clone for ImageEmbedding
Source§fn clone(&self) -> ImageEmbedding
fn clone(&self) -> ImageEmbedding
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 moreimpl Copy for ImageEmbedding
Source§impl Debug for ImageEmbedding
impl Debug for ImageEmbedding
Source§impl<'id> Decoder<'id, ImageEmbedding> for ImageEmbeddingsDecoder
impl<'id> Decoder<'id, ImageEmbedding> for ImageEmbeddingsDecoder
Source§type Event = Result<ImageEmbeddingResponse, String>
type Event = Result<ImageEmbeddingResponse, String>
The vector, or the error envelope Cohere can answer a 200 with.
Source§fn classify(
&self,
frame: WireFrame,
) -> WireEvent<<ImageEmbeddingsDecoder as Decoder<'id, ImageEmbedding>>::Event>
fn classify( &self, frame: WireFrame, ) -> WireEvent<<ImageEmbeddingsDecoder as Decoder<'id, ImageEmbedding>>::Event>
Decode and classify one frame. A JSON wire MUST delegate to a
classifier in
crate::providers::internal::wire, so the
decode-then-validate policy is not re-derived per provider.Source§fn decode(
&mut self,
reply: <ImageEmbeddingsDecoder as Decoder<'id, ImageEmbedding>>::Event,
out: Out<'id, ImageEmbedding>,
) -> Result<Flow, ProviderError>
fn decode( &mut self, reply: <ImageEmbeddingsDecoder as Decoder<'id, ImageEmbedding>>::Event, out: Out<'id, ImageEmbedding>, ) -> Result<Flow, ProviderError>
Write one
Known event into the reply. An error ends the reply with
it.impl Eq for ImageEmbedding
Source§impl Operation for ImageEmbedding
impl Operation for ImageEmbedding
Source§type End = EmbeddingResponse
type End = EmbeddingResponse
What the provider sends when it ends the reply. A fold needs one to
produce a response, so a reply that stopped early has none.
Source§type Response = EmbeddingResponse
type Response = EmbeddingResponse
The normalized response the events and the end fold into.
Source§type Fold = Traced<ImageEmbedding, Embedded>
type Fold = Traced<ImageEmbedding, Embedded>
One reply’s state: it absorbs the events the consumer sees, then
folds them with the end into the response.
Source§fn fold(
request: &<ImageEmbedding as Operation>::Request,
call: &mut Call<'_>,
) -> <ImageEmbedding as Operation>::Fold
fn fold( request: &<ImageEmbedding as Operation>::Request, call: &mut Call<'_>, ) -> <ImageEmbedding as Operation>::Fold
The state for one reply to
request, before its first frame. The
call says who answers and in which mode; an operation that records
telemetry opens its span here and hands it to
Call::instrument.Source§fn prepare(
request: Self::Request,
wire: &Descriptor<'_>,
) -> Result<Self::Request, ProviderError>
fn prepare( request: Self::Request, wire: &Descriptor<'_>, ) -> Result<Self::Request, ProviderError>
Shape
request for the wire wire describes, or reject a request
no provider of this operation can answer. The driver calls it before
the request is encoded, so a rejected request reaches no wire or
transport. Passes every request through by default.Source§impl PartialEq for ImageEmbedding
impl PartialEq for ImageEmbedding
impl StructuralPartialEq for ImageEmbedding
Auto Trait Implementations§
impl Freeze for ImageEmbedding
impl RefUnwindSafe for ImageEmbedding
impl Send for ImageEmbedding
impl Sync for ImageEmbedding
impl Unpin for ImageEmbedding
impl UnsafeUnpin for ImageEmbedding
impl UnwindSafe for ImageEmbedding
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.