AurelioSparseEncoder Objects

class AurelioSparseEncoder(SparseEncoder)

Sparse encoder using Aurelio Platform’s embedding API. Requires an API key from https://platform.aurelio.ai

__init__

def __init__(name: str | None = None, api_key: Optional[str] = None)

Initialize the AurelioSparseEncoder.

Arguments:

  • name (str | None): The name of the model to use.
  • api_key (str | None): The API key to use.

__call__

def __call__(docs: list[str]) -> list[SparseEmbedding]

Encode a list of documents using the Aurelio Platform embedding API. Documents

must be strings, sparse encoders do not support other types.

Arguments:

  • docs (list[str]): The documents to encode.

Returns:

list[SparseEmbedding]: The encoded documents.

acall

async def acall(docs: list[str]) -> list[SparseEmbedding]

Asynchronously encode a list of documents using the Aurelio Platform

embedding API. Documents must be strings, sparse encoders do not support other types.

Arguments:

  • docs (list[str]): The documents to encode.

Returns:

list[SparseEmbedding]: The encoded documents.

fit

def fit(docs: List[str])

Fit the encoder to a list of documents. AurelioSparseEncoder does not support

fit yet.

Arguments:

  • docs (list[str]): The documents to fit the encoder to.