Struct rig::embeddings::DocumentEmbeddings
source · pub struct DocumentEmbeddings {
pub id: String,
pub document: Value,
pub embeddings: Vec<Embedding>,
}
Expand description
Struct that holds a document and its embeddings.
The struct is designed to model any kind of documents that can be serialized to JSON (including a simple string). Moreover, it can hold multiple embeddings for the same document, thus allowing a large or non-text document to be “ragged” from various smaller text documents.
Fields§
§id: String
§document: Value
§embeddings: Vec<Embedding>
Trait Implementations§
source§impl Clone for DocumentEmbeddings
impl Clone for DocumentEmbeddings
source§fn clone(&self) -> DocumentEmbeddings
fn clone(&self) -> DocumentEmbeddings
Returns a copy 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 moresource§impl<'de> Deserialize<'de> for DocumentEmbeddings
impl<'de> Deserialize<'de> for DocumentEmbeddings
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 DocumentEmbeddings
impl PartialEq for DocumentEmbeddings
source§fn eq(&self, other: &DocumentEmbeddings) -> bool
fn eq(&self, other: &DocumentEmbeddings) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for DocumentEmbeddings
impl Serialize for DocumentEmbeddings
impl Eq for DocumentEmbeddings
impl StructuralPartialEq for DocumentEmbeddings
Auto Trait Implementations§
impl Freeze for DocumentEmbeddings
impl RefUnwindSafe for DocumentEmbeddings
impl Send for DocumentEmbeddings
impl Sync for DocumentEmbeddings
impl Unpin for DocumentEmbeddings
impl UnwindSafe for DocumentEmbeddings
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<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.