#[non_exhaustive]pub struct HybridEmbedResult {
pub dense: Option<Vec<Vec<f32>>>,
pub sparse: Option<Vec<SparseVector>>,
pub multi_vector: Option<Vec<Vec<Vec<f32>>>>,
pub usage: Option<TokenUsage>,
}Expand description
Dense, sparse, and multi-vector embeddings from a single forward pass.
Each field is Some iff its head was both requested (set in the heads
argument to HybridEmbeddingModel::embed) and available (set in
HybridEmbeddingModel::available_heads); otherwise it is None. When a
requested-and-available head is computed over an empty input batch the field
is Some of an empty Vec, never None.
usage follows the EmbedResult convention:
Some for remote providers that report token counts, None for local ones.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dense: Option<Vec<Vec<f32>>>Pooled dense vectors, one per input. Some iff the dense head was
requested and available.
sparse: Option<Vec<SparseVector>>Learned-sparse vectors, one per input. Some iff the sparse head was
requested and available.
multi_vector: Option<Vec<Vec<Vec<f32>>>>Per-token (multi-vector / ColBERT) embeddings, one ragged list per input.
Some iff the multi-vector head was requested and available.
usage: Option<TokenUsage>Token usage reported by the provider, if any.
Trait Implementations§
Source§impl Clone for HybridEmbedResult
impl Clone for HybridEmbedResult
Source§fn clone(&self) -> HybridEmbedResult
fn clone(&self) -> HybridEmbedResult
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HybridEmbedResult
impl Debug for HybridEmbedResult
Source§impl Default for HybridEmbedResult
impl Default for HybridEmbedResult
Source§fn default() -> HybridEmbedResult
fn default() -> HybridEmbedResult
Auto Trait Implementations§
impl Freeze for HybridEmbedResult
impl RefUnwindSafe for HybridEmbedResult
impl Send for HybridEmbedResult
impl Sync for HybridEmbedResult
impl Unpin for HybridEmbedResult
impl UnsafeUnpin for HybridEmbedResult
impl UnwindSafe for HybridEmbedResult
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Any.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Any.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.