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

# 文件限制参考

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

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

### 接受的文件类型

| 种类  | 扩展名                            | 角色收到的内容                          |
| --- | ------------------------------ | -------------------------------- |
| 文档  | `.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 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://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=<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.
