> ## 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.

# Chroma 集成

> 使用 LangChain Python 与 Chroma 集成。

> [Chroma](https://docs.trychroma.com/getting-started) 是一个使用向量嵌入构建 AI 应用的数据库。

## 安装和设置

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

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

## 向量存储

存在一个围绕 Chroma 向量数据库的封装器，允许您将其用作向量存储，
无论是用于语义搜索还是示例选择。

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

有关 Chroma 封装器的更详细演练，请参阅[此笔记本](/oss/python/integrations/vectorstores/chroma)

## 检索器

```python theme={"theme":{"light":"catppuccin-latte","dark":"catppuccin-mocha"}}
from langchain_classic.retrievers import SelfQueryRetriever
```

***

<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/chroma.mdx)或[提交 issue](https://github.com/langchain-ai/docs/issues/new/choose).
  </Callout>
</div>
