pub struct DocumentTableBuilder<C: Connection, E = Bert, K: Chunker = SemanticChunker> { /* private fields */ }Expand description
A builder for creating a new document table.
Implementations§
Source§impl<C: Connection, E, K: Chunker> DocumentTableBuilder<C, E, K>
impl<C: Connection, E, K: Chunker> DocumentTableBuilder<C, E, K>
Sourcepub fn with_embedding_model<E2>(
self,
embedding_model: E2,
) -> DocumentTableBuilder<C, E2, K>
pub fn with_embedding_model<E2>( self, embedding_model: E2, ) -> DocumentTableBuilder<C, E2, K>
Set the embedding model for the table.
Sourcepub fn with_chunker<K2: Chunker>(
self,
chunker: K2,
) -> DocumentTableBuilder<C, E, K2>
pub fn with_chunker<K2: Chunker>( self, chunker: K2, ) -> DocumentTableBuilder<C, E, K2>
Set the chunking strategy for the table.
Sourcepub async fn build<R: Serialize + DeserializeOwned>(
self,
) -> Result<DocumentTable<C, R, E, K>, DocumentTableCreationError>where
E: Embedder,
pub async fn build<R: Serialize + DeserializeOwned>(
self,
) -> Result<DocumentTable<C, R, E, K>, DocumentTableCreationError>where
E: Embedder,
Build the document table.
Auto Trait Implementations§
impl<C, E, K> Freeze for DocumentTableBuilder<C, E, K>
impl<C, E = Bert, K = SemanticChunker> !RefUnwindSafe for DocumentTableBuilder<C, E, K>
impl<C, E, K> Send for DocumentTableBuilder<C, E, K>
impl<C, E, K> Sync for DocumentTableBuilder<C, E, K>
impl<C, E, K> Unpin for DocumentTableBuilder<C, E, K>
impl<C, E = Bert, K = SemanticChunker> !UnwindSafe for DocumentTableBuilder<C, E, K>
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<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more