AutoEmbeddings
Automatically select the best embeddings handler for your use case
AutoEmbeddings is a class that automatically selects the appropriate embeddings handler for you, based on the model name you provide.
Installation
Embeddings require the appropriate library to be installed. See the Installation Guide for more information.
Usage
Load the embeddings handler for the model you want to use.
After loading the embeddings handler, you can use it in the same way you would use any other embeddings handler.
SemanticChunkers interally call upon the AutoEmbeddings class to get the embeddings handler. So you can directly pass in a string to the embeddings
parameter as well,
as long as it matches one of the models supported by AutoEmbeddings, and its dependencies are installed.
Method: get_embeddings
The get_embeddings
method is a factory method that returns an instance of the appropriate embeddings handler.
The name of the embeddings model to use.
Was this page helpful?