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. It will be removed in None==1.0.0.
NeMo embedding models.
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 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]]
Examples using NeMoEmbeddings