pub struct EmbeddingRequest {
pub id: String,
pub content: String,
pub metadata: HashMap<String, Value>,
}Expand description
A request for embedding generation, used in batch processing
Embedding requests bundle text content with metadata and a unique identifier for efficient batch processing and result tracking.
§Example
use rrag::prelude::*;
let request = EmbeddingRequest::new("chunk-1", "The quick brown fox")
.with_metadata("chunk_index", 0.into())
.with_metadata("document_id", "doc-123".into());Fields§
§id: StringUnique identifier for the request
content: StringText content to embed
metadata: HashMap<String, Value>Optional metadata to attach to the embedding
Implementations§
Trait Implementations§
Source§impl Clone for EmbeddingRequest
impl Clone for EmbeddingRequest
Source§fn clone(&self) -> EmbeddingRequest
fn clone(&self) -> EmbeddingRequest
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 Freeze for EmbeddingRequest
impl RefUnwindSafe for EmbeddingRequest
impl Send for EmbeddingRequest
impl Sync for EmbeddingRequest
impl Unpin for EmbeddingRequest
impl UnwindSafe for EmbeddingRequest
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