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

# Sambanova 集成

> 使用 LangChain Python 与 Sambanova 集成。

Customers are turning to [SambaNova](https://sambanova.ai/) to quickly deploy state-of-the-art AI capabilities to gain competitive advantage. Our purpose-built enterprise-scale AI platform is the technology backbone for the next generation of AI computing. We power the foundation models that unlock the valuable business insights trapped in data.

Designed for AI, the SambaNova RDU was built with a revolutionary dataflow architecture. This design makes the RDU significantly more efficient for these workloads than GPUs as it eliminates redundant calls to memory, which are an inherent limitation of how GPUs function. This built-in efficiency is one of the features that makes the RDU capable of much higher performance than GPUs in a fraction of the footprint.

On top of our architecture We have developed some platforms that allow companies and developers to get full advantage of the RDU processors and open source models.

## 安装和设置

安装集成包：

<CodeGroup>
  ```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  pip install langchain-sambanova
  ```

  ```bash uv theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
  uv add langchain-sambanova
  ```
</CodeGroup>

## API Key

设置您的 API 密钥 it as an environment variable:

If you are a SambaCloud user request an [API key](http://cloud.sambanova.ai/apis?utm_source=langchain\&utm_medium=external\&utm_campaign=cloud_signup) and set it as an environment variable:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
export SAMBANOVA_API_KEY="your-sambacloud-api-key-here"
```

Or if you are SambaStack user set your base URL and API key as environment variables:

```bash theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
export SAMBANOVA_API_BASE="your-sambastack-envirronment-base-url-here"
export SAMBANOVA_API_KEY="your-sambastack-api-key-here"
```

## 聊天模型

For a detailed walkthrough of the `ChatSambaNova` component, see the [usage example](/oss/python/integrations/chat/sambanova)

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

## 向量嵌入模型

For a detailed walkthrough of the `SambaNovaEmbeddings` component, see the [usage example](/oss/python/integrations/embeddings/sambanova)

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

[SambaNova API Reference](https://docs.sambanova.ai/cloud/api-reference)

***

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

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