> ## 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.

<Note>Available in Embedded and Python SDK. The JS/TS SDK handles embedding generation internally.</Note>

<Tabs>
  <Tab title="Embedded">
    ```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)
    ```
  </Tab>

  <Tab title="Python SDK">
    ```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)`

    Delegates to the configured LangChain Embeddings object for embedding generation.

    ### Example Usage

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

    texts = ["First document", "Second document"]
    embeddings = store.get_embeddings(texts)
    print(f"Embeddings shape: {embeddings.shape}")  # (2, 384)
    ```
  </Tab>
</Tabs>
