OVHCloudEmbeddings#

class langchain_community.embeddings.ovhcloud.OVHCloudEmbeddings[source]#

Bases: BaseModel, Embeddings

OVHcloud AI Endpoints Embeddings.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

param access_token: str = ''#

OVHcloud AI Endpoints model name for embeddings generation

param model_name: str = ''#

OVHcloud AI Endpoints region

param region: str = 'kepler'#
async aembed_documents(texts: list[str]) list[list[float]]#

Asynchronous Embed search docs.

Parameters:

texts (list[str]) – List of text to embed.

Returns:

List of embeddings.

Return type:

list[list[float]]

async aembed_query(text: str) list[float]#

Asynchronous Embed query text.

Parameters:

text (str) – Text to embed.

Returns:

Embedding.

Return type:

list[float]

embed_documents(texts: List[str]) List[List[float]][source]#

Create a retry decorator for PremAIEmbeddings. :param texts: The list of texts to embed. :type texts: List[str]

Returns:

List of embeddings, one for each input text.

Return type:

List[List[float]]

Parameters:

texts (List[str])

embed_query(text: str) List[float][source]#

Embed a single query text. :param text: The text to embed. :type text: str

Returns:

Embeddings for the text.

Return type:

List[float]

Parameters:

text (str)

Examples using OVHCloudEmbeddings