nemoguardrails.embeddings.providers.azureopenai
Module Contents
Classes
Functions
API
Bases: EmbeddingModel
Embedding model using Azure OpenAI.
This class represents an embedding model that utilizes the Azure OpenAI API for generating text embeddings.
Parameters:
The name of the Azure OpenAI deployment model (e.g., “text-embedding-ada-002”).
Retrieve the embedding dimension for the specified model.
Encode a list of documents into their corresponding embeddings.
Parameters:
The list of documents to be encoded.
Returns: List[List[float]]
List[List[float]]: The list of embeddings, where each embedding is a list of floats.
Raises:
RuntimeError: If the API call fails.
Asynchronously encode a list of documents into their corresponding embeddings.
Parameters:
The list of documents to be encoded.
Returns: List[List[float]]
List[List[float]]: The list of embeddings, where each embedding is a list of floats.