pub struct SparseTextEmbedding {
pub tokenizer: Tokenizer,
/* private fields */
}
Expand description
Rust representation of the SparseTextEmbedding model
Fields§
§tokenizer: Tokenizer
Implementations§
Source§impl SparseTextEmbedding
impl SparseTextEmbedding
Sourcepub fn try_new(options: SparseInitOptions) -> Result<Self>
pub fn try_new(options: SparseInitOptions) -> Result<Self>
Try to generate a new SparseTextEmbedding Instance
Uses the highest level of Graph optimization
Uses the total number of CPUs available as the number of intra-threads
Sourcepub fn list_supported_models() -> Vec<ModelInfo<SparseModel>>
pub fn list_supported_models() -> Vec<ModelInfo<SparseModel>>
Retrieve a list of supported models
Sourcepub fn get_model_info(model: &SparseModel) -> ModelInfo<SparseModel>
pub fn get_model_info(model: &SparseModel) -> ModelInfo<SparseModel>
Get ModelInfo from SparseModel
Auto Trait Implementations§
impl !Freeze for SparseTextEmbedding
impl !RefUnwindSafe for SparseTextEmbedding
impl Send for SparseTextEmbedding
impl Sync for SparseTextEmbedding
impl Unpin for SparseTextEmbedding
impl !UnwindSafe for SparseTextEmbedding
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> 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