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,
) -> WasmBoxedFuture<'a, Result<Embedding, EmbeddingError>>;
fn embed_texts(
&self,
texts: Vec<String>,
) -> WasmBoxedFuture<'_, Result<Vec<Embedding>, EmbeddingError>>;
}๐Deprecated since 0.25.0:
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
๐Deprecated since 0.25.0:
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
๐Deprecated since 0.25.0:
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, ) -> WasmBoxedFuture<'a, Result<Embedding, EmbeddingError>>
๐Deprecated since 0.25.0:
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>, ) -> WasmBoxedFuture<'_, Result<Vec<Embedding>, EmbeddingError>>
๐Deprecated since 0.25.0:
DynClientBuilder and related features have been deprecated and will be removed in a future release. In this case, use EmbeddingModel instead.