pub struct EmbedManyResult<Val> {
pub values: Vec<Val>,
pub embeddings: Vec<Vec<f32>>,
pub total_usage: EmbeddingUsage,
}Expand description
Result of embedding multiple values
Fields§
§values: Vec<Val>The original values that were embedded
embeddings: Vec<Vec<f32>>The embedding vectors (in the same order as values)
total_usage: EmbeddingUsageTotal token usage across all API calls
Implementations§
Source§impl<Val> EmbedManyResult<Val>
impl<Val> EmbedManyResult<Val>
Sourcepub fn embeddings(&self) -> &[Vec<f32>]
pub fn embeddings(&self) -> &[Vec<f32>]
Get all embeddings
Sourcepub fn usage(&self) -> &EmbeddingUsage
pub fn usage(&self) -> &EmbeddingUsage
Get total token usage
Trait Implementations§
Source§impl<Val: Clone> Clone for EmbedManyResult<Val>
impl<Val: Clone> Clone for EmbedManyResult<Val>
Source§fn clone(&self) -> EmbedManyResult<Val>
fn clone(&self) -> EmbedManyResult<Val>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<Val> Freeze for EmbedManyResult<Val>
impl<Val> RefUnwindSafe for EmbedManyResult<Val>where
Val: RefUnwindSafe,
impl<Val> Send for EmbedManyResult<Val>where
Val: Send,
impl<Val> Sync for EmbedManyResult<Val>where
Val: Sync,
impl<Val> Unpin for EmbedManyResult<Val>where
Val: Unpin,
impl<Val> UnwindSafe for EmbedManyResult<Val>where
Val: 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