NeMoEmbeddings#

class langchain_community.embeddings.nemo.NeMoEmbeddings[source]#

Bases: BaseModel, Embeddings

Deprecated since version 0.0.37: Directly instantiating a NeMoEmbeddings from langchain-community is deprecated. Please use langchain-nvidia-ai-endpoints NVIDIAEmbeddings interface.

NeMo embedding models.

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

Raises ValidationError if the input data cannot be parsed to form a valid model.

param api_endpoint_url: str = 'http://localhost:8088/v1/embeddings'#
param batch_size: int = 16#
param model: str = 'NV-Embed-QA-003'#
async aembed_documents(texts: List[str]) β†’ List[List[float]][source]#

Call out to NeMo’s embedding endpoint async for embedding search docs.

Parameters:

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

Returns:

List of embeddings, one for each text.

Return type:

List[List[float]]

async aembed_query(text: str) β†’ List[float][source]#

Call out to NeMo’s embedding endpoint async for embedding query text.

Parameters:

text (str) – The text to embed.

Returns:

Embedding for the text.

Return type:

List[float]

embed_documents(documents: List[str]) β†’ List[List[float]][source]#

Embed a list of document texts.

Parameters:
  • texts – The list of texts to embed.

  • documents (List[str]) –

Returns:

List of embeddings, one for each text.

Return type:

List[List[float]]

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

Embed query text.

Parameters:

text (str) – Text to embed.

Returns:

Embedding.

Return type:

List[float]

Examples using NeMoEmbeddings