pub trait EmbeddingModelDyn: WasmCompatSend + WasmCompatSync {
// Required methods
fn max_documents(&self) -> usize;
fn ndims(&self) -> usize;
fn embed_text<'a>(
&'a self,
text: &'a str,
) -> Pin<Box<dyn Future<Output = Result<Embedding, EmbeddingError>> + Send + 'a>>;
fn embed_texts(
&self,
texts: Vec<String>,
) -> Pin<Box<dyn Future<Output = Result<Vec<Embedding>, EmbeddingError>> + Send + '_>>;
}DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.
Required Methods§
fn max_documents(&self) -> usize
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.
fn ndims(&self) -> usize
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.
fn embed_text<'a>( &'a self, text: &'a str, ) -> Pin<Box<dyn Future<Output = Result<Embedding, EmbeddingError>> + Send + 'a>>
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.
fn embed_texts( &self, texts: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Embedding>, EmbeddingError>> + Send + '_>>
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".