Skip to main content

AurelioSparseEncoder Objects

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

__init__

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

__call__

Encode a list of queries using the Aurelio Platform embedding API. Documents must be strings, sparse encoders do not support other types.

acall

Asynchronously encode a list of documents using the Aurelio Platform embedding API. Documents must be strings, sparse encoders do not support other types. :param docs: The documents to encode. :type docs: list[str] :param input_type: :type semantic_router.encoders.encode_input_type.EncodeInputType :return: The encoded documents. :rtype: list[SparseEmbedding]

fit

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.