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

# Camel.embeddings.together embedding

<a id="camel.embeddings.together_embedding" />

<a id="camel.embeddings.together_embedding.TogetherEmbedding" />

## TogetherEmbedding

```python theme={"system"}
class TogetherEmbedding:
```

Provides text embedding functionalities using Together AI's models.

**Parameters:**

* **model\_type** (str, optional): The model name to be used for text embeddings. (default: :obj:`togethercomputer/m2-bert-80M-8k-retrieval`)
* **api\_key** (str, optional): The API key for authenticating with the Together service. (default: :obj:`None`)
* **dimensions** (int, optional): The text embedding output dimensions. (default: :obj:`None`)

<a id="camel.embeddings.together_embedding.TogetherEmbedding.__init__" />

### **init**

```python theme={"system"}
def __init__(
    self,
    model_type: str = 'togethercomputer/m2-bert-80M-8k-retrieval',
    api_key: Optional[str] = None,
    dimensions: Optional[int] = None
):
```

<a id="camel.embeddings.together_embedding.TogetherEmbedding.embed_list" />

### embed\_list

```python theme={"system"}
def embed_list(self, objs: list[str], **kwargs: Any):
```

Generates embeddings for the given texts.

**Parameters:**

* **objs** (list\[str]): The texts for which to generate the embeddings. \*\*kwargs (Any): Extra kwargs passed to the embedding API.

**Returns:**

list\[list\[float]]: A list that represents the generated embedding
as a list of floating-point numbers.

<a id="camel.embeddings.together_embedding.TogetherEmbedding.get_output_dim" />

### get\_output\_dim

```python theme={"system"}
def get_output_dim(self):
```

**Returns:**

int: The dimensionality of the embedding for the current model.
