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

# Sourcey 集成

> 使用 LangChain JavaScript 从已发布的 Sourcey 文档站点检索。

[Sourcey](https://sourcey.com) 构建静态文档站点。

使用 `langchain-sourcey` 从已发布的 Sourcey 文档站点中检索。它
读取 `search-index.json`，在存在时使用 `llms-full.txt`，并返回
规范页面 URL 以供引用。

## 安装和设置

安装 `langchain-sourcey`：

```bash npm theme={null}
npm install langchain-sourcey @langchain/core
```

```bash yarn theme={null}
yarn add langchain-sourcey @langchain/core
```

```bash pnpm theme={null}
pnpm add langchain-sourcey @langchain/core
```

不需要 API 密钥。

将检索器指向已发布的 Sourcey 文档构建的根目录。它读取
`search-index.json` 以获取候选页面，并在存在该文件时读取 `llms-full.txt` 以获取完整页面内容。

## 检索器

您可以在标准检索管道中使用 [`SourceyRetriever`](https://langchain-docs-zh.mintlify.site/langchain/oss/javascript/integrations/retrievers/sourcey)。

```typescript theme={null}
import { SourceyRetriever } from "langchain-sourcey";
```

查看 [使用示例](https://langchain-docs-zh.mintlify.site/langchain/oss/javascript/integrations/retrievers/sourcey.md) 或 [Sourcey 指南](https://sourcey.com/docs/guides/guide-langchain-retriever)。

***

> 官方原文：[src/oss/javascript/integrations/providers/sourcey.mdx](https://github.com/langchain-ai/docs/blob/main/src/oss/javascript/integrations/providers/sourcey.mdx) · 非官方翻译，译文由 AI 生成，以英文原文为准。


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.