LangChain LLM that uses the Completions API with NVIDIA NIMs.
Client to NVIDIA embeddings models.
LangChain Document Compressor that uses the NVIDIA NeMo Retriever Reranking API.
Callback Handler that tracks OpenAI info.
ChatNVIDIA subclass that injects nvext.agent_hints into requests
for Dynamo KV cache routing optimization.
A unique prefix_id is auto-generated for every request.
NVIDIA chat model.
Set inference priority for all LLM calls within scope.
Lower number = higher priority (priority=1 is most urgent).
Works as both a decorator and a context manager::
# decorator — depriori
Base exception for NVIDIA RAG retriever errors.
Raised when the RAG server endpoint is unreachable.
Common causes:
Raised when the RAG server returns an error response.
Includes the HTTP status code and response body for debugging.
Raised when the request payload is invalid (e.g. 422 Unprocessable Entity).
LangChain retriever that queries the NVIDIA RAG Blueprint /v1/search endpoint.
Targets containerized RAG deployments where the rag-server exposes the search API. Supports all DocumentSearch parameter
Model information.
Standardize the model name to a format that can be used in the OpenAI API.
Get the cost in USD for a given model and number of tokens.
Get the OpenAI callback handler in a context manager.
Exposes token and cost information.
Parse thinking content from text.
This function handles multiple formats by trying to find the reasoning content
Convert a LangChain message to a dictionary.
Return the active inference priority, or None if unset.
Register a model as a known model.
Must be done at the beginning of a program, at least before the model is used or available models are listed.
For instance:
from langchain_nvidia_ai_end
Lookup a model by name, using only the table of known models.
The name is either:
None)Callers can check to see if the name was an al
Determine the model to use based on a name, using only the table of known models.
Raise a warning if the model is found to be an alias of a known model.
If the model is not found, return None.