> For the complete documentation index, see [llms.txt](https://gitbook.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook.com/docs/documentation/zh/ai-yu-sou-suo/connections.md).

# 连接

连接让你可以将外部内容引入你的文档站点。

已连接的内容可以显示在 [AI 搜索](/docs/documentation/zh/docs-site/ai-search.md) 和 [GitBook Assistant](/docs/documentation/zh/ai-yu-sou-suo/gitbook-ai-assistant.md)中。某些连接还可以帮助 GitBook 生成变更请求。

要添加连接，请打开你站点的 **设置** 并点击 **连接**.

<figure><img src="/files/47112bc49921d9b197ee7f8bcc3fa5ae95cdd563" alt=""><figcaption></figcaption></figure>

### 可用的连接

你可以连接支持平台、开发者社区以及其他内容来源：

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4>Intercom</h4></td><td><a href="/pages/f63e0d2c142f664a974aca340791cc4bbc3ddf94">/pages/f63e0d2c142f664a974aca340791cc4bbc3ddf94</a></td></tr><tr><td><h4>Zendesk</h4></td><td><a href="/pages/3afdb97fd9c370f997febe56eae34f38de80d402">/pages/3afdb97fd9c370f997febe56eae34f38de80d402</a></td></tr><tr><td><h4>Freshdesk</h4></td><td></td></tr><tr><td><h4>Front</h4></td><td></td></tr><tr><td><h4>HubSpot</h4></td><td></td></tr><tr><td><h4>Zoho Desk</h4></td><td></td></tr><tr><td><h4>Pylon</h4></td><td><a href="/pages/0bcf2d2e5762e24b14d0d9eb52fc6c24bb7553de">/pages/0bcf2d2e5762e24b14d0d9eb52fc6c24bb7553de</a></td></tr><tr><td><h4>GitHub 讨论</h4></td><td><a href="/pages/562928fb49735ee90ac0cd8f09711660d4596ed6">/pages/562928fb49735ee90ac0cd8f09711660d4596ed6</a></td></tr><tr><td><h4>GitHub 问题</h4></td><td><a href="/pages/af9c375501680738bc2408c802ee3303a8b04208">/pages/af9c375501680738bc2408c802ee3303a8b04208</a></td></tr><tr><td><h4>YouTube</h4></td><td></td></tr><tr><td><h4>网站</h4></td><td></td></tr><tr><td><h4>MCP 服务器</h4></td><td></td></tr></tbody></table>

### 连接的工作方式

{% stepper %}
{% step %}

#### 连接一个来源

选择一个来源类型。然后进行授权，或输入你希望 GitBook 导入的 URL。

{% hint style="info" %}
如果你连接 YouTube，请输入频道 ID——不是频道名称。

频道名称对这个来源不起作用。

在 YouTube Studio 中，打开 **设置** → **频道** → **高级设置**.

复制 **频道 ID**.

如果你的频道 URL 包含 `/channel/`，请复制其后面的部分 `/channel/`.
{% endhint %}

每个连接都会从该来源创建一条记录流，例如问题、讨论、工单、对话、页面或视频。
{% endstep %}

{% step %}

#### GitBook 会同步记录

保存连接后，GitBook 会开始同步该来源的记录。

在连接列表中，你可以查看同步状态、记录数量和上次同步时间。

已连接的 URL 默认每天刷新一次。你也可以从你站点的手动触发刷新 **设置** → **连接**.
{% endstep %}

{% step %}

#### 选择记录的使用方式

对于每个连接，你可以选择其记录是否显示在搜索和 GitBook Assistant 中，以及它们是否帮助 GitBook 生成变更请求。

你还可以调整连接的搜索排名，以提高或降低其记录的优先级。
{% endstep %}
{% endstepper %}

### 连接设置

编辑连接时，你可以配置以下选项：

#### 标签

用途 **标签** 为连接赋予一个清晰的名称。

这会让该来源在连接列表中更容易识别，尤其是在你连接了多个仓库、网站或频道时。

#### 自动生成变更请求

{% hint style="warning" %}
自动生成变更请求目前处于早期访问阶段。

查看 [自动改进文档](/docs/documentation/zh/gitbook-agent/automatic-docs-improvements.md) 以获取有关申请访问权限的信息
{% endhint %}

开启 **自动生成变更请求** 以便让 GitBook 从该连接的记录中学习并建议文档更新。

GitBook 可以使用这些记录创建变更请求，其中包含建议的更改，供你的团队审阅。

#### 在搜索 / 助手中公开

开启 **在搜索 / 助手中公开** 以使该连接中的记录可被访客搜索，并可用于回答问题。

这使已连接的内容能够出现在你站点的 AI 驱动搜索体验中，以及 GitBook Assistant 的回复中。

{% hint style="warning" %}
启用 **在搜索 / 助手中公开** 会使该连接中的记录对任何可以访问该站点的人可用——如果站点对外共享，外部访客也包括在内。
{% endhint %}

#### 搜索排名提升

用途 **搜索排名提升** 以在搜索中提高或降低某个连接记录的优先级。

如果这个来源应该更频繁地出现，就提高该值。如果它应该比你的主要文档权重更低，就降低该值。

### 数据保留与隐私

#### GitBook 会索引什么？

GitBook 会索引你连接中的内容，并将其用于搜索、变更请求和其他内容驱动的功能。我们从某个连接中索引的每一项都称为一个 **记录。** 记录的示例包括 Intercom 工单、Freshdesk 工单、网站页面等。

我们使用记录来建议内容更改，并为在 GitBook 中运行的代理提供额外上下文。

只要来源保持连接状态，我们就会保留记录。如果你移除连接，我们会删除所有已存储的记录。我们不会删除任何使用这些记录作为上下文生成的内容，也不会从任何已存储的 AI 对话日志中移除记录内容。

例如，你可能连接了 Intercom，GitBook 会根据一条已关闭的 Intercom 支持工单建议文档更改。如果你随后移除 Intercom 连接，我们所有与 Intercom 相关的已存储数据都会被删除，但变更请求会保留。

有关我们的连接器的更多信息，可在各个连接器的专门页面中找到。

#### 常见问题

<details>

<summary>你们关于 PII 的政策是什么？</summary>

通常，GitBook 只会请求可用作上下文的来源字段（有关每个来源的更多细节，请参阅连接器页面）。

当我们摄取一条记录时，会先经过 PII 脱敏流程。第一步是在内存中对任何电子邮件、电话号码、地址和其他个人信息进行脱敏。

随后，我们会通过第三方 LLM 进行第二步 PII 处理。这是一个符合 ZDR 的不存储请求，不会保存在第三方的服务器上，也不会用于任何训练。

在进行这些预处理时，PII 可能会在我们的服务器上存在几分钟，但我们只会存储处理后的记录。

</details>

<details>

<summary>你们会将数据发送给任何第三方吗？</summary>

在我们完成最初的内部 PII 脱敏后，会使用第三方来脱敏 PII。

在创建变更请求和回应用户问题时，我们也会在第三方提供商中使用已脱敏的记录内容。

例如，在使用 GitBook Agent 编写内容时，代理可能会将外部记录中的内容作为额外上下文。

</details>

<details>

<summary>GitBook 是否会将数据用于任何模型训练，无论是自身还是通过第三方？</summary>

不会，我们不会使用记录数据进行训练，并且会向第三方提供商确认他们也不会这样做。

</details>

<details>

<summary>我可以限制 GitBook 获取哪些记录吗？</summary>

有关每个来源可配置内容，请参阅我们各个连接器的专门页面。

* [Intercom](/docs/documentation/zh/ai-yu-sou-suo/connections/intercom.md)
* [Zendesk](/docs/documentation/zh/ai-yu-sou-suo/connections/zendesk.md)
* Freshdesk
* Front
* HubSpot
* Zoho Desk
* [Pylon](/docs/documentation/zh/ai-yu-sou-suo/connections/pylon.md)

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://gitbook.com/docs/documentation/zh/ai-yu-sou-suo/connections.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
