pub trait EmbeddingsClientDyn: ProviderClient {
// Required methods
fn embedding_model<'a>(
&self,
model: &str,
) -> Box<dyn EmbeddingModelDyn + 'a>;
fn embedding_model_with_ndims<'a>(
&self,
model: &str,
ndims: usize,
) -> Box<dyn EmbeddingModelDyn + 'a>;
}
Required Methods§
Sourcefn embedding_model<'a>(&self, model: &str) -> Box<dyn EmbeddingModelDyn + 'a>
fn embedding_model<'a>(&self, model: &str) -> Box<dyn EmbeddingModelDyn + 'a>
Create an embedding model with the given name.
Note: default embedding dimension of 0 will be used if model is not known.
If this is the case, it’s better to use function embedding_model_with_ndims
Sourcefn embedding_model_with_ndims<'a>(
&self,
model: &str,
ndims: usize,
) -> Box<dyn EmbeddingModelDyn + 'a>
fn embedding_model_with_ndims<'a>( &self, model: &str, ndims: usize, ) -> Box<dyn EmbeddingModelDyn + 'a>
Create an embedding model with the given name and the number of dimensions in the embedding generated by the model.