Skip to content

armgit / camel

Public Imported from GitHub
0

🐫 CAMEL: The first and the best multi-agent framework. Finding the Scaling Law of Agents. https://www.camel-ai.org

1.5 KB
Raw Blame
<a id="camel.embeddings.mistral_embedding"></a>

<a id="camel.embeddings.mistral_embedding.MistralEmbedding"></a>

## MistralEmbedding

```python
class MistralEmbedding:
```

Provides text embedding functionalities using Mistral's models.

**Parameters:**

- **model_type** (EmbeddingModelType, optional): The model type to be used for text embeddings. (default: :obj:`MISTRAL_EMBED`)
- **api_key** (str, optional): The API key for authenticating with the Mistral service. (default: :obj:`None`)
- **dimensions** (int, optional): The text embedding output dimensions. (default: :obj:`None`)

<a id="camel.embeddings.mistral_embedding.MistralEmbedding.__init__"></a>

### __init__

```python
def __init__(
    self,
    model_type: EmbeddingModelType = EmbeddingModelType.MISTRAL_EMBED,
    api_key: str | None = None,
    dimensions: int | None = None
):
```

<a id="camel.embeddings.mistral_embedding.MistralEmbedding.embed_list"></a>

### embed_list

```python
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.mistral_embedding.MistralEmbedding.get_output_dim"></a>

### get_output_dim

```python
def get_output_dim(self):
```

**Returns:**

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