> ## Documentation Index
> Fetch the complete documentation index at: https://cndoc-langchain.site/llms.txt
> Use this file to discover all available pages before exploring further.

# ChatNVIDIA 集成

> 使用 LangChain Python 与 ChatNVIDIA 和 ChatNVIDIADynamo 聊天模型集成。

本文将帮助您开始使用 NVIDIA [聊天模型](/oss/python/langchain/models)。有关所有 `ChatNVIDIA` 功能和配置的详细文档，请访问 [API 参考](https://reference.langchain.com/python/langchain-nvidia-ai-endpoints/chat_models/ChatNVIDIA)。

## 概述

`langchain-nvidia-ai-endpoints` 包包含 LangChain 与由 [NVIDIA AI Foundation Models](https://www.nvidia.com/en-us/ai-data-science/foundation-models/) 提供支持并托管在 [NVIDIA API Catalog](https://build.nvidia.com/) 上的聊天模型和嵌入模型的集成。

一个强大的起点是 [Nemotron](https://www.nvidia.com/en-us/ai-data-science/foundation-models/nemotron/)，这是 NVIDIA 专为智能体 AI 构建的开放模型系列。Nemotron 模型使用混合 Mamba-Transformer 专家混合架构，提供领先的准确度，吞吐量比同类模型高出多达 3 倍，并支持高达 100 万 token 的上下文窗口。模型权重、训练数据和实现方案在 NVIDIA Open Model License 下公开发布。

NVIDIA AI Foundation 模型运行在 NIM 微服务上：通过 [NVIDIA NGC Catalog](https://catalog.ngc.nvidia.com/) 分发的容器镜像，这些镜像暴露了标准的 OpenAI 兼容 API，并使用 TensorRT-LLM 进行优化以实现最大吞吐量。它们可以通过托管的 [NVIDIA API Catalog](https://build.nvidia.com/) 访问，也可以使用 NVIDIA AI Enterprise 许可证在本地部署。

本页介绍如何使用 LangChain 通过 `ChatNVIDIA` 与 NVIDIA 模型交互，包括来自 API Catalog 的 Nemotron 和其他模型。

有关通过此 API 访问嵌入模型的更多信息，请参阅 [`NVIDIAEmbeddings`](/oss/python/integrations/embeddings/nvidia_ai_endpoints) 文档。

### 集成详情

| 类                                                                                                           | 包                                                                                                       | 可序列化 | JS 支持 |                                                       下载量                                                      |                                                      版本                                                     |
| :---------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------ | :--: | :---: | :------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------: |
| [`ChatNVIDIA`](https://reference.langchain.com/python/langchain-nvidia-ai-endpoints/chat_models/ChatNVIDIA) | [`langchain-nvidia-ai-endpoints`](https://reference.langchain.com/python/langchain-nvidia-ai-endpoints) | beta |   ❌   | ![PyPI - Downloads](https://img.shields.io/pypi/dm/langchain_nvidia_ai_endpoints?style=flat-square\&label=%20) | ![PyPI - Version](https://img.shields.io/pypi/v/langchain_nvidia_ai_endpoints?style=flat-square\&label=%20) |

### 模型功能

| [工具调用](/oss/python/langchain/tools) | [结构化输出](/oss/python/langchain/structured-output) | [图像输入](/oss/python/langchain/messages#multimodal) | 音频输入 | 视频输入 | [Token 级流式传输](/oss/python/langchain/streaming/) | 原生异步 | [Token 使用情况](/oss/python/langchain/models#token-usage) | [对数概率](/oss/python/langchain/models#log-probabilities) |
| :---------------------------------: | :----------------------------------------------: | :-----------------------------------------------: | :--: | :--: | :---------------------------------------------: | :--: | :----------------------------------------------------: | :----------------------------------------------------: |
|                  ✅                  |                         ✅                        |                         ✅                         |   ❌  |   ❌  |                        ✅                        |   ✅  |                            ✅                           |                            ❌                           |

## 安装包

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
pip install -qU langchain-nvidia-ai-endpoints
```

## 访问 NVIDIA API Catalog

要获得 NVIDIA API Catalog 的访问权限，请执行以下操作：

1. 在 [NVIDIA API Catalog](https://build.nvidia.com/) 上创建一个免费账户并登录。
2. 单击您的个人资料图标，然后单击 **API Keys**。将显示 **API Keys** 页面。
3. 单击 **Generate API Key**。将显示 **Generate API Key** 窗口。
4. 单击 **Generate Key**。您应该会看到 **API Key Granted**，并且您的密钥会出现。
5. 复制并保存密钥为 `NVIDIA_API_KEY`。
6. 要验证您的密钥，请使用以下代码。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import getpass
import os

if os.environ.get("NVIDIA_API_KEY", "").startswith("nvapi-"):
    print("Valid NVIDIA_API_KEY already in environment. Delete to reset")
else:
    nvapi_key = getpass.getpass("NVAPI Key (starts with nvapi-): ")
    assert nvapi_key.startswith(
        "nvapi-"
    ), f"{nvapi_key[:5]}... is not a valid key"
    os.environ["NVIDIA_API_KEY"] = nvapi_key
```

现在您可以使用您的密钥访问 NVIDIA API Catalog 上的端点。

要启用模型调用的自动跟踪，请设置您的 [LangSmith](/langsmith/home) API 密钥：

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
os.environ["LANGSMITH_TRACING"] = "true"
os.environ["LANGSMITH_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")
```

## 实例化

现在我们可以访问 NVIDIA API Catalog 中的模型。[Nemotron](https://www.nvidia.com/en-us/ai-data-science/foundation-models/nemotron/) 模型是智能体和推理工作负载的推荐起点：

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_nvidia_ai_endpoints import ChatNVIDIA

# Nemotron 3 Nano — 高效推理和智能体任务
llm = ChatNVIDIA(model="nvidia/nemotron-3-super-120b-a12b")
```

可以通过传递其模型 ID 来使用 API Catalog 中的任何其他模型：

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
llm = ChatNVIDIA(model="mistralai/mixtral-8x7b-instruct-v0.1")
```

## 调用

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
result = llm.invoke("Write a ballad about LangChain.")
print(result.content)
```

## 使用 NVIDIA NIM 微服务自托管

当您准备好部署 AI 应用程序时，可以使用 NVIDIA NIM 自托管模型。更多信息，请参阅 [NVIDIA NIM 微服务](https://www.nvidia.com/en-us/ai-data-science/products/nim-microservices/)。

以下代码连接到本地托管的 NIM 微服务。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_nvidia_ai_endpoints import ChatNVIDIA, NVIDIAEmbeddings, NVIDIARerank

# 连接到在 localhost:8000 运行的聊天 NIM，指定模型
llm = ChatNVIDIA(base_url="http://localhost:8000/v1", model="nvidia/nemotron-3-super-120b-a12b")

# 连接到在 localhost:8080 运行的嵌入 NIM
embedder = NVIDIAEmbeddings(base_url="http://localhost:8080/v1")

# 连接到在 localhost:2016 运行的重排序 NIM
ranker = NVIDIARerank(base_url="http://localhost:2016/v1")
```

## 流式传输、批处理和异步

这些模型原生支持流式传输，并且与所有 LangChain LLM 一样，它们提供批处理方法以处理并发请求，以及用于调用、流式传输和批处理的异步方法。以下是几个示例。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
print(llm.batch(["What's 2*3?", "What's 2*6?"]))
# 或通过异步 API
# await llm.abatch(["What's 2*3?", "What's 2*6?"])
```

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
for chunk in llm.stream("How far can a seagull fly in one day?"):
    # 显示 token 分隔
    print(chunk.content, end="|")
```

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
async for chunk in llm.astream(
    "How long does it take for monarch butterflies to migrate?"
):
    print(chunk.content, end="|")
```

## 支持的模型

查询 `available_models` 仍然会返回您的 API 凭据提供的所有其他模型。

`playground_` 前缀是可选的。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
ChatNVIDIA.get_available_models()
# llm.get_available_models()
```

## 模型类型

以上所有模型都受支持，可以通过 `ChatNVIDIA` 访问。

一些模型类型支持独特的提示技术和聊天消息。我们将在下面回顾一些重要的内容。

**要了解有关特定模型的更多信息，请导航到 AI Foundation 模型的 API 部分 [如这里链接所示](https://catalog.ngc.nvidia.com/orgs/nvidia/teams/ai-foundation/models/codellama-13b/api)。**

### 用于智能体 AI 的 Nemotron 模型

[Nemotron](https://www.nvidia.com/en-us/ai-data-science/foundation-models/nemotron/) 是 NVIDIA 专为智能体工作流构建的开放模型系列。主要特点：

* **效率**：混合 Mamba-Transformer MoE 架构提供比同类密集模型高出多达 3 倍的吞吐量
* **长上下文**：原生支持高达 100 万 token 的上下文窗口
* **智能体推理**：专门针对多步规划、工具使用和自主软件工程任务进行训练
* **开放**：权重、训练方案和精选数据集在 NVIDIA Open Model License 下发布

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate
from langchain_nvidia_ai_endpoints import ChatNVIDIA

prompt = ChatPromptTemplate.from_messages(
    [
        ("system", "You are a helpful research assistant. Think step by step."),
        ("user", "{input}"),
    ]
)
chain = prompt | ChatNVIDIA(model="nvidia/nemotron-3-super-120b-a12b") | StrOutputParser()

for txt in chain.stream({"input": "What are the key considerations when designing a multi-agent RAG system?"}):
    print(txt, end="")
```

### 通用聊天

像 `meta/llama3-8b-instruct` 和 `mistralai/mixtral-8x22b-instruct-v0.1` 这样的模型是很好的全能模型，您可以将它们与任何 LangChain 聊天消息一起使用。示例如下。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate
from langchain_nvidia_ai_endpoints import ChatNVIDIA

prompt = ChatPromptTemplate.from_messages(
    [("system", "You are a helpful AI assistant named Fred."), ("user", "{input}")]
)
chain = prompt | ChatNVIDIA(model="nvidia/nemotron-3-super-120b-a12b") | StrOutputParser()

for txt in chain.stream({"input": "What's your name?"}):
    print(txt, end="")
```

### 代码生成

这些模型接受与常规聊天模型相同的参数和输入结构，但它们在代码生成和结构化代码任务上往往表现更好。一个例子是 `meta/codellama-70b`。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
prompt = ChatPromptTemplate.from_messages(
    [
        (
            "system",
            "You are an expert coding AI. Respond only in valid python; no narration whatsoever.",
        ),
        ("user", "{input}"),
    ]
)
chain = prompt | ChatNVIDIA(model="meta/codellama-70b") | StrOutputParser()

for txt in chain.stream({"input": "How do I solve this fizz buzz problem?"}):
    print(txt, end="")
```

## 多模态

NVIDIA 还支持多模态输入，这意味着您可以同时提供图像和文本供模型推理。支持多模态输入的一个示例模型是 `nvidia/neva-22b`。

以下是使用示例：

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import IPython
import requests

image_url = "https://www.nvidia.com/content/dam/en-zz/Solutions/research/ai-playground/nvidia-picasso-3c33-p@2x.jpg"  ## 大图像
image_content = requests.get(image_url).content

IPython.display.Image(image_content)
```

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_nvidia_ai_endpoints import ChatNVIDIA

llm = ChatNVIDIA(model="nvidia/neva-22b")
```

#### 通过 URL 传递图像

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain.messages import HumanMessage

llm.invoke(
    [
        HumanMessage(
            content=[
                {"type": "text", "text": "Describe this image:"},
                {"type": "image_url", "image_url": {"url": image_url}},
            ]
        )
    ]
)
```

#### 通过 base64 编码字符串传递图像

目前，客户端会进行一些额外处理以支持像上面那样的大图像。但对于较小的图像（以及为了更好地说明底层过程），我们可以直接传递图像，如下所示：

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import IPython
import requests

image_url = "https://picsum.photos/seed/kitten/300/200"
image_content = requests.get(image_url).content

IPython.display.Image(image_content)
```

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import base64

from langchain.messages import HumanMessage

## 适用于较简单的图像。对于较大的图像，请参阅实际实现
b64_string = base64.b64encode(image_content).decode("utf-8")

llm.invoke(
    [
        HumanMessage(
            content=[
                {"type": "text", "text": "Describe this image:"},
                {
                    "type": "image_url",
                    "image_url": {"url": f"data:image/png;base64,{b64_string}"},
                },
            ]
        )
    ]
)
```

#### 直接在字符串中

NVIDIA API 独特地接受内联在 `<img/>` HTML 标签中的 base64 图像。虽然这与其他 LLM 不兼容，但您可以直接相应地提示模型。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
base64_with_mime_type = f"data:image/png;base64,{b64_string}"
llm.invoke(f'What\'s in this image?\n<img src="{base64_with_mime_type}" />')
```

## 在 `RunnableWithMessageHistory` 中的示例用法

与任何其他集成一样，`ChatNVIDIA` 可以很好地支持聊天实用程序，如 RunnableWithMessageHistory，它类似于使用 `ConversationChain`。下面，我们展示了应用于 `mistralai/mixtral-8x22b-instruct-v0.1` 模型的 [LangChain `RunnableWithMessageHistory`](https://reference.langchain.com/python/langchain-core/runnables/history/RunnableWithMessageHistory) 示例。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
pip install -qU langchain
```

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_core.chat_history import InMemoryChatMessageHistory
from langchain_core.runnables.history import RunnableWithMessageHistory

# store 是一个将会话 ID 映射到其相应聊天历史记录的字典。
store = {}  # 内存维护在链外部


# 返回给定会话 ID 的聊天历史记录的函数。
def get_session_history(session_id: str) -> InMemoryChatMessageHistory:
    if session_id not in store:
        store[session_id] = InMemoryChatMessageHistory()
    return store[session_id]


chat = ChatNVIDIA(
    model="nvidia/nemotron-3-super-120b-a12b",
    temperature=0.1,
    max_tokens=100,
    top_p=1.0,
)

# 定义一个 RunnableConfig 对象，包含一个 `configurable` 键。session_id 决定线程
config = {"configurable": {"session_id": "1"}}

conversation = RunnableWithMessageHistory(
    chat,
    get_session_history,
)

conversation.invoke(
    "Hi I'm Srijan Dubey.",  # 输入或查询
    config=config,
)
```

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
conversation.invoke(
    "I'm doing well! Just having a conversation with an AI.",
    config=config,
)
```

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
conversation.invoke(
    "Tell me about yourself.",
    config=config,
)
```

## 工具调用

从 v0.2 开始，`ChatNVIDIA` 支持 [`bind_tools`](https://reference.langchain.com/python/langchain-nvidia-ai-endpoints/chat_models/ChatNVIDIA#member-bind_tools-2)。

`ChatNVIDIA` 提供与 [build.nvidia.com](https://build.nvidia.com) 上各种模型以及本地 NIM 的集成。并非所有这些模型都经过工具调用训练。请务必选择确实支持工具调用的模型用于您的实验和应用程序。

您可以通过以下方式获取已知支持工具调用的模型列表：

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
tool_models = [
    model for model in ChatNVIDIA.get_available_models() if model.supports_tools
]
tool_models
```

使用支持工具的模型：

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain.tools import tool
from pydantic import Field


@tool
def get_current_weather(
    location: str = Field(description="The location to get the weather for."),
):
    """Get the current weather for a location."""
    ...


llm = ChatNVIDIA(model=tool_models[0].id).bind_tools(tools=[get_current_weather])
response = llm.invoke("What is the weather in Boston?")
response.tool_calls
```

有关其他示例，请参阅 [如何使用聊天模型调用工具](/oss/python/langchain/tools)。

## 与 NVIDIA Dynamo 一起使用

[NVIDIA Dynamo](https://developer.nvidia.com/dynamo) 是一个分布式推理服务框架，旨在在数据中心规模的多节点环境中部署模型。它通过将推理的不同阶段分解到不同的 GPU 上，智能地将请求路由到适当的 GPU 以避免冗余计算，并通过将数据缓存扩展到经济高效的存储层来简化和自动化分布式服务的复杂性。

`ChatNVIDIADynamo` 是 `ChatNVIDIA` 的直接替代品，它会自动将 `nvext.agent_hints` 注入到每个请求中。这些提示告诉 Dynamo 部署：

* **`osl`**（输出序列长度）— 预期有多少个 token，以便调度器可以规划内存分配
* **`iat`**（到达间隔时间）— 请求到达的速度，以便路由器可以预测负载
* **`latency_sensitivity`**（延迟敏感性）— 请求对延迟的敏感程度，以便交互式调用获得优先路由
* **`priority`**（优先级）— 请求优先级，以便后台工作可以让位于关键路径请求

每个请求都会自动生成一个唯一的 `prefix_id`，使路由器能够跟踪 KV 缓存亲和性。

<Note>
  本节假设您有一个正在运行的 [NVIDIA Dynamo 部署](https://docs.nvidia.com/dynamo/latest/getting-started/quickstart)。
</Note>

### 基本用法

将 `ChatNVIDIA` 替换为 `ChatNVIDIADynamo`，每个请求都会自动包含路由提示。支持所有标准的 `ChatNVIDIA` 参数。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_nvidia_ai_endpoints import ChatNVIDIA, ChatNVIDIADynamo

BASE_URL = "http://localhost:8099/v1"
MODEL = "your-model-name"

# 标准 ChatNVIDIA — 无 Dynamo 提示
llm_standard = ChatNVIDIA(base_url=BASE_URL, model=MODEL)

# ChatNVIDIADynamo — 相同的接口，自动注入 agent_hints
llm = ChatNVIDIADynamo(base_url=BASE_URL, model=MODEL)

result = llm.invoke("What is KV cache optimization?")
print(result.content)
```

`ChatNVIDIADynamo` 除了 `ChatNVIDIA` 支持的参数外，还接受四个额外参数：

| 参数                    | 类型      | 默认值   | 描述                 |
| --------------------- | ------- | ----- | ------------------ |
| `osl`                 | `int`   | `512` | 预期输出序列长度（token）    |
| `iat`                 | `int`   | `250` | 预期到达间隔时间（毫秒）       |
| `latency_sensitivity` | `float` | `1.0` | 较高的延迟敏感性获得优先路由     |
| `priority`            | `int`   | `1`   | 较低的优先级设置获得更多的调度优先级 |

### 在构造时设置默认值

在创建模型实例时配置 Dynamo 提示。当模型实例始终服务于特定角色时，这很有用，例如高优先级交互式助手与低优先级后台摘要器。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
# 高优先级：短响应，延迟关键
llm_critical = ChatNVIDIADynamo(
    base_url=BASE_URL,
    model=MODEL,
    osl=20,
    priority=0,
    latency_sensitivity=10.0,
)

# 低优先级：长响应，延迟容忍
llm_background = ChatNVIDIADynamo(
    base_url=BASE_URL,
    model=MODEL,
    osl=512,
    priority=10,
    latency_sensitivity=0,
)
```

### 每次调用时覆盖

Dynamo 参数也可以在每次调用时覆盖。当同一个模型实例处理具有不同特征的请求时，这很有用。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
result = llm.invoke(
    "Classify this as positive or negative: 'I love this product!'",
    osl=10,
    iat=100,
    latency_sensitivity=1.0,
    priority=10,
)
print(result.content)
```

### 使用 Dynamo 提示进行流式传输

Dynamo 提示包含在初始流式请求中。Dynamo 使用它们在 token 开始流动之前选择最佳工作器。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
for chunk in llm_critical.stream("Give a one-sentence summary of GPU computing."):
    print(chunk.content, end="", flush=True)
```

### 检查有效负载

要进行调试，请使用内部 `_get_payload` 方法检查 `ChatNVIDIADynamo` 发送到 NIM 端点的确切有效负载。

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
import json

payload = llm_critical._get_payload(
    inputs=[{"role": "user", "content": "Hello!"}],
    stop=None,
)
print(json.dumps(payload["nvext"], indent=2))
```

这将输出 `nvext.agent_hints` 部分：

```json theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
{
  "agent_hints": {
    "prefix_id": "langchain-dynamo-a1b2c3d4e5f6",
    "osl": 20,
    "iat": 250,
    "latency_sensitivity": 1.0,
    "priority": 10
  }
}
```

## API 参考

有关所有 `ChatNVIDIA` 功能和配置的详细文档，请访问 [API 参考](https://reference.langchain.com/python/langchain-nvidia-ai-endpoints/chat_models/ChatNVIDIA)。

## 相关主题

* [`langchain-nvidia-ai-endpoints` 包 `README`](https://github.com/langchain-ai/langchain-nvidia/blob/main/libs/ai-endpoints/README.md)
* [Nemotron 模型系列](https://www.nvidia.com/en-us/ai-data-science/foundation-models/nemotron/) — NVIDIA 用于智能体 AI 的开放模型
* [NVIDIA API Catalog](https://build.nvidia.com/explore/discover) — 浏览并尝试所有可用模型
* [NVIDIA NIM for Large Language Models (LLMs) 概述](https://docs.nvidia.com/nim/large-language-models/latest/introduction.html)
* [NeMo Retriever Embedding NIM 概述](https://docs.nvidia.com/nim/nemo-retriever/text-embedding/latest/overview.html)
* [NeMo Retriever Reranking NIM 概述](https://docs.nvidia.com/nim/nemo-retriever/text-reranking/latest/overview.html)
* [用于 RAG 工作流的 `NVIDIAEmbeddings` 模型](/oss/python/integrations/embeddings/nvidia_ai_endpoints)
* [NVIDIA Provider 页面](/oss/python/integrations/providers/nvidia)
* [NVIDIA Dynamo](https://developer.nvidia.com/dynamo) — 开源推理框架
* [Dynamo 快速入门指南](https://docs.nvidia.com/dynamo/latest/getting-started/quickstart) — 启动本地部署
* [KV 缓存感知路由](https://docs.nvidia.com/dynamo/latest/user-guides/kv-cache-aware-routing) — 智能路由器的工作原理

***

<div className="source-links">
  <Callout icon="terminal-2">
    [将这些文档](/use-these-docs) 通过 MCP 连接到 Claude、VSCode 等，以获取实时答案。
  </Callout>

  <Callout icon="edit">
    [在 GitHub 上编辑此页面](https://github.com/langchain-ai/docs/edit/main/src/oss/python/integrations/chat/nvidia_ai_endpoints.mdx) 或 [提交问题](https://github.com/langchain-ai/docs/issues/new/choose)。
  </Callout>
</div>
