EmbeddingModelDyn

Trait EmbeddingModelDyn 

Source
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ยง

Source

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.
Source

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.
Source

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.
Source

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.

Implementorsยง