> 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/running-the-room/add-or-remove-characters.md).

# 在对话中途添加或移除角色

在已经运行的聊天体验房间中让某个角色入座、移除某个角色，并处理在轮次期间会被冻结的控件。

房间中的角色可以在对话进行时发生变化。中途加入的角色会收到相同的 [房间简报](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/the-room-brief.md) 内容，与已经就座的角色相同；而被移除的角色则从那一刻起不再回答。使用此页面来更改正在进行中的房间的成员名单，并识别这些控件被冻结的时刻。

### 前提条件

* 一个聊天体验房间，对话已经在进行中。参见 [发送你的第一条消息](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/send-your-first-message.md).
* 当前没有回合进行中。角色名单控件会在角色作答时冻结，并会明确提示这一点。

### 向正在运行的房间添加一个角色

在正在运行的房间中安置角色会使用最初填充房间的选择器，可通过侧边栏中的两个控件之一进入：位于 **在这个房间中** 标题栏中，或 **添加角色** 位于角色列表下方。二者都会打开 **向房间添加角色** 对话框中的两个选项卡， **来自我的工作区** 和 **按角色 ID**。请参阅 [向房间添加角色](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/add-characters-to-the-room.md) 了解如何使用该选择器。

你添加的每个角色都会立即在侧边栏中占据一行，并显示 **正在加入房间……** 其名字下方显示“正在加入房间……”，一旦进入就会变成普通行。线程会标记简报送达的时刻：一条分隔线列出每个加入的角色，并说明它已收到简报。每个角色收到的房间简报都会叠加在其自身的人设之上，与已经就座的角色完全相同。

在对话中途就座的角色从你的下一条消息开始计入。  [回合标题](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/running-the-room/how-a-turn-works.md) 你之前消息上的回合标题描述的是你发送它们时房间的状态，因此不会改变。

### 当只有一个角色的房间变成群组时，会发生什么变化

仅包含一个角色的房间与包含两个或更多角色的房间所显示的信息不同，而安置第二个角色会使其切换过去。

* 消息框会用“回应”标签取代“房间中只有一个角色：每条消息都会发送给 ⟨name⟩。”这一行，该标签用于设置预期由谁回答。参见 [选择谁来回复](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/running-the-room/choose-who-replies.md).
* 侧边栏中显示你自己那一行的部分会从 **你** 到 **主持人**，而你名字下方的行会从“正在与 ⟨name⟩ 对话”变为“你提问，他们回答”。
* 回合标题会从你的下一条消息开始采用计数形式。你在只有一个角色就座时发送的消息会保留以其命名的标题， `已发送给 ⟨name⟩`.

以一个角色开启的房间采用单角色简报，它有自己的一套措辞和规则，而不是由房间类型设定的那些。两种形式都列在 [房间简报是如何写成的](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/the-room-brief/how-the-room-brief-is-written.md).

### 从房间中移除一个角色

移除会将角色从对话中移出，而不会影响它已经说过的话。

打开侧边栏中该角色所在行的菜单——即该行右侧的点菜单——并选择 **从房间移除**。该行会立刻消失，而线程会在房间确认后立即记录一条“⟨name⟩ 离开了房间”的说明。

该角色已发送的消息仍会留在线程中，显示在其名字下方，而你之前消息上的回合标题仍会描述它当时所在的房间。移除一个角色不会将其从你的工作区中删除；它只会离开这段对话。

### 在回合进行时会冻结的控件

加号控件， **添加角色** 和 **从房间移除** 在房间回复消息时，以及房间仍在打开时，都会冻结。原因会直接显示出来，而不是留给你猜测。

| 原因显示为        | 当                      |
| ------------ | ---------------------- |
| **等待当前回合结束** | 当前有回合在进行。回合结束后控件会恢复    |
| **正在连接房间……** | 房间仍在打开，目前还没有任何可更改的成员名单 |

原因会显示在每个被冻结的控件旁边。悬停在加号控件上会显示它，在 **添加角色** 下方的一行会显示它，而角色行菜单会在冻结的 **从房间移除** 项目下方。在空房间中，悬停在 **添加角色** 按钮——位于 **添加参与者** 侧边栏中的卡片上，或在 **房间里还没有人** 线程中——都会显示相同的原因。

一直停留在 **正在连接房间……** 的房间尚未打开。参见 [房间将不会连接](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/troubleshooting/room-will-not-connect.md).

### 该成员名单属于此会话

你现在安置的角色仅针对本次会话有效，安置它并不会将其添加到聊天体验中。再次打开该体验会创建一个空无一人的新房间，无论你上次安置了什么角色。为这个新房间安置角色的方法见 [向房间添加角色](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/add-characters-to-the-room.md).

{% hint style="warning" %}
在房间打开时重新加载页面会结束该会话，包括成员名单在内的一切。已结束的会话无法重新加入，因此请再次安置角色并重新开始一个新会话。
{% endhint %}

### 相关页面

{% content-ref url="/pages/e8c4f3cf759d8396884643e3921456eb2b822714" %}
[房间控件参考](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/running-the-room/room-controls-reference.md)
{% endcontent-ref %}

{% content-ref url="/pages/6681d929bda5625ffaf6efa97e282f671e49a7f6" %}
[轮次如何运作](/api-docs/zh/wu-dai-ma-ti-yan/chat-experiences/running-the-room/how-a-turn-works.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/running-the-room/add-or-remove-characters.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.
