pub struct UpsertTextRequest {
pub documents: Vec<TextDocument>,
pub model: Option<EmbeddingModel>,
}Expand description
Request to upsert text documents with automatic embedding.
Fields§
§documents: Vec<TextDocument>Documents to upsert.
model: Option<EmbeddingModel>Embedding model to use (default: minilm).
Implementations§
Source§impl UpsertTextRequest
impl UpsertTextRequest
Sourcepub fn new(documents: Vec<TextDocument>) -> Self
pub fn new(documents: Vec<TextDocument>) -> Self
Create a new upsert-text request.
Sourcepub fn with_model(self, model: EmbeddingModel) -> Self
pub fn with_model(self, model: EmbeddingModel) -> Self
Set the embedding model.
Trait Implementations§
Source§impl Clone for UpsertTextRequest
impl Clone for UpsertTextRequest
Source§fn clone(&self) -> UpsertTextRequest
fn clone(&self) -> UpsertTextRequest
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 moreSource§impl Debug for UpsertTextRequest
impl Debug for UpsertTextRequest
Source§impl<'de> Deserialize<'de> for UpsertTextRequest
impl<'de> Deserialize<'de> for UpsertTextRequest
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
Auto Trait Implementations§
impl Freeze for UpsertTextRequest
impl RefUnwindSafe for UpsertTextRequest
impl Send for UpsertTextRequest
impl Sync for UpsertTextRequest
impl Unpin for UpsertTextRequest
impl UnsafeUnpin for UpsertTextRequest
impl UnwindSafe for UpsertTextRequest
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