pub trait SparseEmbeddingModel:
Send
+ Sync
+ Debug
+ DynClone {
// Required method
fn sparse_embed<'life0, 'async_trait>(
&'life0 self,
input: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SparseEmbedding>, Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
// Provided method
fn name(&self) -> &'static str { ... }
}Expand description
Embeds a list of strings and returns its embeddings. Assumes the strings will be moved.
Required Methods§
fn sparse_embed<'life0, 'async_trait>(
&'life0 self,
input: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<SparseEmbedding>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Provided Methods§
Trait Implementations§
Source§impl<'clone> Clone for Box<dyn SparseEmbeddingModel + 'clone>
impl<'clone> Clone for Box<dyn SparseEmbeddingModel + 'clone>
Source§fn clone(&self) -> Box<dyn SparseEmbeddingModel + 'clone>
fn clone(&self) -> Box<dyn SparseEmbeddingModel + 'clone>
Returns a copy 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 more