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 + '_>>;
}👎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, ) -> Pin<Box<dyn Future<Output = Result<Embedding, EmbeddingError>> + Send + 'a>>
👎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>, ) -> Pin<Box<dyn Future<Output = Result<Vec<Embedding>, EmbeddingError>> + Send + '_>>
👎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.