> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room/file-limits-reference.md).

# 文件限制参考

聊天体验房间接受的文件类型、附件的大小和文本限制，以及每个附件标签和侧边栏说明含义的参考。

聊天体验房间接受少数几种文件格式，并限制它与角色共享的文件内容量。本页列出了这些格式、限制，以及当文件超出其中一项时房间会如何处理。

### 接受的文件类型

| Kind | 扩展名                            | 角色能收到的内容                               |
| ---- | ------------------------------ | -------------------------------------- |
| 文档   | `.pdf`, `.docx`                | 文档中的文本；如果某个 PDF 的页面几乎没有文本，则改为提供这些页面的描述 |
| 纯文本  | `.txt`, `.md`, `.csv`, `.json` | 文件中的文本                                 |
| 图片   | `.png`, `.jpg`, `.jpeg`        | 用文字写出的图片描述                             |

无论何种类型，文件都会发送给该轮消息所针对的角色，而消息未针对的角色不会收到它。参见 [将文件共享到房间](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room.md) 了解如何指定所有人。

房间会在消息框下方的一行中直接显示该列表："接受：PDF、DOCX、TXT、MD、CSV、JSON、PNG、JPG · 每个最多 25 MB"。

只有在你至少附加了一个文件之后，这一行才会出现，因此在你选择文件之前，屏幕上不会显示它供你阅读。带有 `.jpeg` 扩展名的文件会被接受，尽管 `.jpg`这一行只写了 JPG。

表格中没有列出的任何内容，在你选择它时都会被拒绝，并且不会发送任何相关内容。

### 大小和文本限制

| 限制                | 值          |
| ----------------- | ---------- |
| 单个文件大小            | 25 MB      |
| 单个文件共享的文本         | 30,000 个字符 |
| 单条消息共享的文本         | 60,000 个字符 |
| 文本很少的 PDF 中被描述的页面 | 4          |

这两个字符限制计算的是共享出去的内容，而不是文件本身包含的内容。为图片写出的描述与文档自身的文本一样，都会计入限制。

### 达到各项限制时会发生什么

| 你做了什么                   | 房间会怎么做                                                                 |
| ----------------------- | ---------------------------------------------------------------------- |
| 选择了一个格式不被接受的文件          | 该文件不会附加。消息显示“⟨name⟩ 不是受支持的文件类型。”                                       |
| 选择了一个超过 25 MB 的文件       | 该文件不会附加。消息显示“⟨name⟩ 大于 25 MB。”                                         |
| 附加了一个包含超过 30,000 个字符的文件 | 文件会被附加并发送。文本会在限制处被截断，剩余部分不会共享，并且 `已截断` 会添加到标签中                         |
| 附加文件合计超过 60,000 个字符     | 超过限制的文件会从消息中移除。消息显示“⟨name⟩ 会使此消息超过共享文本 60,000 个字符的限制。请单独发送它，或移除另一个文件。” |
| 附加了一个页数超过四页且文本很少的 PDF   | 前四页会被描述。角色会被告知哪些页面没有被描述                                                |
| 附加了一个房间无法读取的文件          | 文件只以名称发送。标签显示 `无法读取` 在大小之后                                             |

一次选择多个文件会分别检查每个文件。因格式或大小被拒绝的文件不会妨碍其余文件附加。

### 标签第二行显示的内容

你附加的每个文件都会在你输入内容的上方显示一个标签，其第二行以文件大小开头：1 KB 以下以字节显示，1 MB 以下以整千字节显示，超过则保留一位小数。大小后面的内容取决于文件：

| 第二行                      | 这意味着什么                               |
| ------------------------ | ------------------------------------ |
| `1.2 MB · 读取中…`          | 文件正在读取。发送控件正在等待                      |
| `1.1 MB · 描述中…`          | 文件正在被描述。发送控件正在等待                     |
| `4 KB`                   | 文本文件，已读取                             |
| `12 KB · 240 行`          | CSV 文件，已读取。计数包括表头行                   |
| `8 KB · 8 个键`            | 包含一组字段的 JSON 文件，已读取                  |
| `8 KB · 12 项`            | 包含一个列表的 JSON 文件，已读取                  |
| `1.2 MB · 文档`            | Word 文件，已读取                          |
| `1.2 MB · 14 页`          | PDF，读取其自身文本                          |
| `1.2 MB · 14 页 · 4 页已描述` | 页面改为被描述的 PDF                         |
| `1.1 MB · 已描述`           | 图片，已描述                               |
| `1.2 MB · 无法读取`          | 按名称共享的文件                             |
| `1.1 MB · 无法描述`          | 按名称共享的图片                             |
| `… · 已截断`                | 当共享文本在 30,000 个字符处被截断时，会添加到任何共享文本结果中 |

只要任何标签仍显示 `读取中…` 或 `描述中…`，并在所有标签都处理完毕后恢复可用。若在没有标签等待时发送控件仍不可用，则是因其他原因被锁定：参见 [你无法发送消息](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/troubleshooting/composer-is-locked.md).

### 侧边栏显示什么

该 **在房间中共享** 侧边栏的该部分列出了你在此对话中发送的文件。以标签形式在消息框上方等待的文件尚未出现在这里，而你从消息中移除的文件则永远不会到达这里。在发送第一个文件之前，会有一行文字代替列表："你附加的文件会显示在这里，所有角色都能看到。"

列表中的每个文件最多带有一条备注：

| 文件旁的备注 | 角色收到的内容  |
| ------ | -------- |
| 无备注    | 文件中的文本   |
| `已描述`  | 用文字写出的描述 |
| `仅名称`  | 仅文件名     |

**清空对话**，在房间顶部栏的三点菜单中，会清空列表。参见 [房间控件参考](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/running-the-room/room-controls-reference.md).

### 相关页面

{% content-ref url="/pages/249ce1883d72f03fd0e4615caaa45c3e1b7cfee3" %}
[共享文档](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room/share-a-document.md)
{% endcontent-ref %}

{% content-ref url="/pages/56bfbde4a02d00c401381281f1e85909fdb478ca" %}
[共享图片](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room/share-an-image.md)
{% endcontent-ref %}

{% content-ref url="/pages/b58c87ca81e42b07582f4aa34e0b374f7a59d7b7" %}
[与房间共享文件](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room.md)
{% endcontent-ref %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room/file-limits-reference.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
