langchain_nvidia_ai_endpoints.embeddings.NVIDIAEmbeddings¶
class langchain_nvidia_ai_endpoints.embeddings.NVIDIAEmbeddings[source]¶
Bases: BaseModel, Embeddings
NVIDIA’s AI Foundation Retriever Question-Answering Asymmetric Model.
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 client: langchain_nvidia_ai_endpoints._common.NVEModel = <class 'langchain_nvidia_ai_endpoints._common.NVEModel'>¶
param max_batch_size: int = 50¶
param max_length: int = 2048¶
Constraints
minimum = 1
maximum = 2048
param model: str [Required]¶
The embedding model to use. Example: nvolveqa_40k
param model_type: Optional[Literal['passage', 'query']] = 'passage'¶
The type of text to be embedded.
async aembed_documents(texts: List[str]) → List[List[float]]¶
Asynchronous Embed search docs.
async aembed_query(text: str) → List[float]¶
Asynchronous Embed query text.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values
copy(*, include: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, exclude: Optional[Union[AbstractSetIntStr, MappingIntStrAny]] = None, update: Optional[DictStrAny] = None, deep: bool = False) → Model¶