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

# 与房间共享文件

了解当你在聊天体验房间中给消息附加文件时，角色会接收到什么，以及房间之后会保留什么。

你在一个中发送的一条消息 [聊天体验](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences.md) 房间可以携带文件。文件从不会以文件的形式交给角色：角色收到的是文本——要么是文件本身已有的文字，要么是为它写的一段描述。这些页面说明了每种文件会变成什么、房间会向你显示什么，以及对话结束后会保留什么。

### 角色收到的内容

文件会发送给这条回合所指定的角色。消息没有指定到的角色不会收到该文件，而随后跟着的回复也不会把它传递下去。如果你想让每个角色都收到文件，就把消息发送给所有人——标记 `@everyone`，或者将回复芯片设为 **所有人都必须回复**——然后再发送。参见 [选择谁回复](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/running-the-room/choose-who-replies.md).

这些角色收到的是文本，而且只有文本。房间承载的是文字，所以你附加的每个文件在传送之前都会变成文字。

这会通过两种方式发生。包含文字的文件会以其自身的文字共享：PDF、Word 文件以及所有纯文本格式，都会作为其所包含的文本送达角色。包含图片的文件无法这样共享，因此会写出一段图片描述，角色收到的便是这段描述。系统会告诉角色，这些文字是在描述你附加的一张图片，而这段描述就是他们作答时所依据的全部内容。

你共享的文件属于你共享它时所在的对话。每个新对话开始时都不包含任何已共享内容。

### 每种文件会变成什么

| 你附加的内容                                 | 送达角色的内容                |
| -------------------------------------- | ---------------------- |
| 纯文本文件——`.txt`, `.md`, `.csv`，或 `.json` | 文件自身的文本                |
| Word 文件——`.docx`                       | 文档的文本                  |
| 包含一整段散文的 PDF                           | 文档的文本                  |
| 本身文字很少的 PDF                            | 它所包含的任何文本，然后是其前几页的文字描述 |
| 图片——`.png`, `.jpg`，或 `.jpeg`           | 用文字写出的图片描述             |

PDF 是唯一具有两种结果的格式，而且两种结果都正确。 [共享文档](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room/share-a-document.md) 说明你会得到哪一种，以及房间如何告诉你。

### 无法读取文件时

房间无法读取的文件仍会被发送。只有文件名会送达角色，不会有其他内容，消息也不会被拦下。

在事先无法知道文件内容是否能够共享。你会在之后得知。你附加的每个文件都会在输入框上方生成一个芯片，而该芯片的第二行会在文件处理完后确定下来。内容未被共享的文件会在那一行注明这一点，而房间无法读取的文件——或无法描述的图片——也会弹出一条消息，显示文件名。

用于附加文件的回形针图标只会在消息框被锁定时变灰。没有文件会让它不可用。参见 [你不能发送消息](/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/share-files-with-the-room/file-limits-reference.md) 说明每条注释的含义，以及 [运行房间](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/running-the-room.md) 介绍面板的其他部分。
* **一场完成的会话的转录。** 它会记录每个回合携带的所有文件名称，而你下载的转录会在这些名称下面列出它们随哪一回合发送。参见 [查看过去的会话](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/sessions-and-transcripts/review-a-past-session.md) 和 [导出转录](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/sessions-and-transcripts/export-a-transcript.md).

**清除对话** 在房间的三点菜单中会清空 **在房间中共享** 列表以及对话线程。参见 [房间控制参考](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/running-the-room/room-controls-reference.md).

由于只保留名称，过去会话线程中的每个文件都会以名称显示，不论当时它发生了什么。转录记录的是文件曾被共享，而不是角色从中得到了什么。

### 哪一页回答哪一个问题

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>共享文档</strong><br>附加一个 PDF、Word 文件或纯文本文件，并阅读芯片对它的报告。</td><td><a href="/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room/share-a-document.md">共享文档</a></td></tr><tr><td><strong>共享图片</strong><br>附加一张图片，并了解角色会被告知什么。</td><td><a href="/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room/share-an-image.md">共享图片</a></td></tr><tr><td><strong>文件限制参考</strong><br>可接受的文件类型、大小和文本限制，以及每种文件会发生什么。</td><td><a href="/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/share-files-with-the-room/file-limits-reference.md">文件限制参考</a></td></tr></tbody></table>

消息框——文件附加的位置——是房间的三个工作部分之一。

{% content-ref url="/pages/2a2f97d08c3487b60a613b33320d63e9352288a4" %}
[运行房间](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/running-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.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.
