EmbeddingsClientDyn

Trait EmbeddingsClientDyn 

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

Source

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

Source

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.

Implementors§

Source§

impl<T: EmbeddingsClient<EmbeddingModel = M>, M: EmbeddingModel + 'static> EmbeddingsClientDyn for T