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

# get_embeddings

Generates embeddings for the given texts using the configured embedding model.

```python theme={null}
get_embeddings(texts: Union[str, List[str]]) -> np.ndarray
```

### Parameters

| Parameter | Type                    | Description                                         |
| --------- | ----------------------- | --------------------------------------------------- |
| `texts`   | `Union[str, List[str]]` | Single text string or list of text strings to embed |

### Returns

`np.ndarray`: NumPy array of embeddings

* If single text: 1-D array of shape `(dimension,)`
* If list of texts: 2-D array of shape `(num_texts, dimension)`

### Exceptions

<AccordionGroup>
  <Accordion title="RuntimeError">
    * Throws if no embedding model is available
  </Accordion>

  <Accordion title="TypeError">
    * Throws if embedding model type is not supported
  </Accordion>
</AccordionGroup>

### Example Usage

```python theme={null}
# Single text embedding
embedding = store.get_embeddings("Hello, world!")
print(f"Embedding shape: {embedding.shape}")  # (384,)

# Multiple text embeddings
texts = ["First document", "Second document", "Third document"]
embeddings = store.get_embeddings(texts)
print(f"Embeddings shape: {embeddings.shape}")  # (3, 384)
```
