> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chonkie.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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](/oss/installation) for more information.

## Usage

Load the embeddings handler for the model you want to use.

```python theme={"system"}
from chonkie import AutoEmbeddings

# Get the embeddings handler for SentenceTransformer
embeddings = AutoEmbeddings.get_embeddings("all-MiniLM-L6-v2")

# Get the embeddings handler for OpenAI
embeddings = AutoEmbeddings.get_embeddings("text-embedding-3-large")

# Get the embeddings handler for Model2Vec
embeddings = AutoEmbeddings.get_embeddings("minishlab/potion-base-32M")

```

After loading the embeddings handler, you can use it in the same way you would use any other embeddings handler.

```python theme={"system"}
from chonkie import SemanticChunker
chunker = SemanticChunker(embedding_model=embeddings, threshold=0.7)

# Chunk the text
chunks = chunker(text)
```

<Info>
  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.
</Info>

## Method: `get_embeddings`

The `get_embeddings` method is a factory method that returns an instance of the appropriate embeddings handler.

<ParamField path="model_name" type="str">
  The name of the embeddings model to use.
</ParamField>

<Returns>
  An instance of the appropriate embeddings handler of type `BaseEmbeddings`.
</Returns>
