pub trait DynEmbeddingModel:
Send
+ Sync
+ 'static {
// Required methods
fn provider(&self) -> &ProviderId;
fn model_id(&self) -> &ModelId;
fn max_embeddings_per_call(&self) -> Option<usize>;
fn max_input_bytes_per_call(&self) -> Option<usize>;
fn supports_parallel_calls(&self) -> bool;
fn do_embed(
&self,
options: EmbedOptions,
) -> BoxFuture<'_, Result<EmbedResult, ProviderError>>;
}Expand description
Object-safe counterpart of EmbeddingModel.
Required Methods§
Sourcefn provider(&self) -> &ProviderId
fn provider(&self) -> &ProviderId
Sourcefn max_embeddings_per_call(&self) -> Option<usize>
fn max_embeddings_per_call(&self) -> Option<usize>
Sourcefn max_input_bytes_per_call(&self) -> Option<usize>
fn max_input_bytes_per_call(&self) -> Option<usize>
Sourcefn supports_parallel_calls(&self) -> bool
fn supports_parallel_calls(&self) -> bool
Sourcefn do_embed(
&self,
options: EmbedOptions,
) -> BoxFuture<'_, Result<EmbedResult, ProviderError>>
fn do_embed( &self, options: EmbedOptions, ) -> BoxFuture<'_, Result<EmbedResult, ProviderError>>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".