pub struct Batch<'m> { /* private fields */ }
Expand description
Builder for batch embedding requests
Collects multiple embedding requests for efficient batch processing.
§Example
let batch = embedding_model.new_batch()
.add_content_with_title("Document 1", "Full text content...")
.add_content_with_title("Document 2", "Another text...");
Implementations§
Source§impl Batch<'_>
impl Batch<'_>
Sourcepub fn add_content<T: IntoContent>(self, content: T) -> Self
pub fn add_content<T: IntoContent>(self, content: T) -> Self
Adds content to the batch
Sourcepub fn add_content_with_title<T: IntoContent>(
self,
title: &str,
content: T,
) -> Self
pub fn add_content_with_title<T: IntoContent>( self, title: &str, content: T, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'m> Freeze for Batch<'m>
impl<'m> !RefUnwindSafe for Batch<'m>
impl<'m> Send for Batch<'m>
impl<'m> Sync for Batch<'m>
impl<'m> Unpin for Batch<'m>
impl<'m> !UnwindSafe for Batch<'m>
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic_veecore::Request