pub struct EmbedResponse {
pub vectors: Vec<Vec<f32>>,
pub usage: Usage,
}Expand description
Embedding vectors returned in request-input order.
§Examples
use providers_kit::{embedding::EmbedResponse, generation::Usage};
let response = EmbedResponse { vectors: vec![vec![0.25, 0.75]], usage: Usage::default() };
assert_eq!(response.vectors.len(), 1);
assert!(response.usage.total_tokens.is_none());Fields§
§vectors: Vec<Vec<f32>>Dense vectors corresponding exactly to request inputs.
usage: UsageProvider usage accounting.
Trait Implementations§
Source§impl Clone for EmbedResponse
impl Clone for EmbedResponse
Source§impl Debug for EmbedResponse
impl Debug for EmbedResponse
Source§impl<'de> Deserialize<'de> for EmbedResponse
impl<'de> Deserialize<'de> for EmbedResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EmbedResponse
impl PartialEq for EmbedResponse
Source§impl Serialize for EmbedResponse
impl Serialize for EmbedResponse
impl StructuralPartialEq for EmbedResponse
Auto Trait Implementations§
impl Freeze for EmbedResponse
impl RefUnwindSafe for EmbedResponse
impl Send for EmbedResponse
impl Sync for EmbedResponse
impl Unpin for EmbedResponse
impl UnsafeUnpin for EmbedResponse
impl UnwindSafe for EmbedResponse
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