Skip to content

EmbeddingClient#

dbally.embeddings.EmbeddingClient #

Bases: ABC

Abstract client for creating text embeddings.

get_embeddings abstractmethod async #

get_embeddings(data: List[str]) -> List[List[float]]

Creates embeddings for the given strings.

PARAMETER DESCRIPTION
data

List of strings to get embeddings for.

TYPE: List[str]

RETURNS DESCRIPTION
List[List[float]]

List of embeddings for the given strings.

Source code in src/dbally/embeddings/base.py
@abstractmethod
async def get_embeddings(self, data: List[str]) -> List[List[float]]:
    """
    Creates embeddings for the given strings.

    Args:
        data: List of strings to get embeddings for.

    Returns:
        List of embeddings for the given strings.
    """