# 枚举类 (/zh-CN/api-reference/conversational-ai/ios/enum)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

<a id="chatmessagetype"></a>
## ChatMessageType [#chatmessagetype]

消息类型枚举。

用于区分会话中的不同消息类型。

#### 枚举值 [#枚举值]

| 枚举值 | 描述 |
| --- | --- |
| `text` | （0）：文本消息类型。 |
| `image` | （1）：图片消息类型。 |
| `unknown` | （2）：未知消息类型。 |

<a id="moduletype"></a>
## ModuleType [#moduletype]

性能监控中的 AI 模块类型。

#### 枚举值 [#枚举值-1]

| 枚举值 | 描述 |
| --- | --- |
| `llm` | （0）：大语言模型推理模块。 |
| `mllm` | （1）：多模态大语言模型推理模块。 |
| `tts` | （2）：文本转语音合成模块。 |
| `context` | （3）：Context 模块类型。 |
| `unknown` | （4）：未知的模块类型。 |

<a id="messagetype"></a>
## MessageType [#messagetype]

用于区分会话系统中不同类型的消息。

#### 枚举值 [#枚举值-2]

| 枚举值 | 描述 |
| --- | --- |
| `metrics` | 指标消息类型。 |
| `error` | 错误消息类型。 |
| `assistant` | 智能体转写消息类型。 |
| `user` | 用户转写消息类型。 |
| `interrupt` | 中断消息类型。 |
| `state` | 状态消息类型。 |
| `imageInfo` | 图像信息消息类型。 |
| `unknown` | 未知消息类型。 |

<a id="priority"></a>
## Priority [#priority]

控制智能体处理消息的优先级。

#### 枚举值 [#枚举值-3]

| 枚举值 | 描述 |
| --- | --- |
| `interrupt` | （0）：高优先级。智能体会立即中断当前交互并处理该消息，适用于紧急或时间敏感的消息。 |
| `append` | （1）：中等优先级。智能体会在当前交互完成后排队处理该消息，适用于后续问题。 |
| `ignore` | （2）：低优先级。如果智能体当前正在交互，该消息将被丢弃，仅在空闲时处理，适用于可选内容。 |

<a id="thinklisteningaction"></a>
## ThinkListeningAction [#thinklisteningaction]

Think 指令到达时智能体处于倾听状态的处理动作。

| 枚举值 | 描述 |
| --- | --- |
| `inject` | 注入当前对话。 |
| `interrupt` | 中断当前交互并处理指令。 |
| `ignore` | 忽略指令。 |
| `append` | 在当前交互完成后追加处理。 |

<a id="thinkthinkingaction"></a>
## ThinkThinkingAction [#thinkthinkingaction]

Think 指令到达时智能体处于思考状态的处理动作。

| 枚举值 | 描述 |
| --- | --- |
| `interrupt` | 中断当前交互并处理指令。 |
| `ignore` | 忽略指令。 |
| `append` | 在当前交互完成后追加处理。 |

<a id="thinkspeakingaction"></a>
## ThinkSpeakingAction [#thinkspeakingaction]

Think 指令到达时智能体处于说话状态的处理动作。

| 枚举值 | 描述 |
| --- | --- |
| `interrupt` | 中断当前交互并处理指令。 |
| `ignore` | 忽略指令。 |
| `append` | 在当前交互完成后追加处理。 |

<a id="agentstate"></a>
## AgentState [#agentstate]

表示智能体在对话过程中的不同状态。

#### 枚举值 [#枚举值-4]

| 枚举值 | 描述 |
| --- | --- |
| `idle` | （0）：空闲状态，智能体未在主动处理。 |
| `silent` | （1）：静默状态，智能体保持静默但已准备好监听。 |
| `listening` | （2）：监听状态，智能体正在主动监听用户输入。 |
| `thinking` | （3）：思考状态，智能体正在处理用户输入并生成响应。 |
| `speaking` | （4）：说话状态，智能体正在说话或输出音频内容。 |
| `unknown` | （5）：未知状态，用于未识别状态的回退处理。 |

<a id="transcriptrendermode"></a>
## TranscriptRenderMode [#transcriptrendermode]

转写渲染模式。

#### 枚举值 [#枚举值-5]

| 枚举值 | 描述 |
| --- | --- |
| `words` | （0）：逐词转写渲染模式，每处理一个词时更新。 |
| `text` | （1）：逐句转写渲染模式，当完整句子准备好时更新。 |

<a id="transcriptstatus"></a>
## TranscriptStatus [#transcriptstatus]

表示会话流程中转录的当前状态。

用于跟踪和管理转录文本的生命周期状态。

#### 枚举值 [#枚举值-6]

| 枚举值 | 描述 |
| --- | --- |
| `inprogress` | （0）：转录进行中。该状态在文本正在生成或播放时设置，表示内容仍在处理或流式传输中。 |
| `end` | （1）：转录已完成。该状态在文本生成正常结束时设置，表示转录片段自然结束。 |
| `interrupted` | （2）：转录被中断。该状态在文本生成被提前停止时设置，适用于被更高优先级消息打断的情况。 |

<a id="transcripttype"></a>
## TranscriptType [#transcripttype]

区分转写文本来源类型。

通过识别转写文本来自智能体或用户，有助于管理会话流程和界面展示。

#### 枚举值 [#枚举值-7]

| 枚举值 | 描述 |
| --- | --- |
| `agent` | ：由智能体生成的转写文本。通常包含智能体助手的响应和发言内容，用于在会话界面中渲染智能体语音。 |
| `user` | ：来自用户的转写文本。包含将用户语音输入转换后的文本，用于在会话流程中展示用户语音内容。 |

<a id="conversationalaiapierrortype"></a>
## ConversationalAIAPIErrorType [#conversationalaiapierrortype]

用于区分会话式智能体系统中的不同错误类型。

#### 枚举值 [#枚举值-8]

| 枚举值 | 描述 |
| --- | --- |
| `unknown` | （0）：未知错误类型。 |
| `rtcError` | （2）：RTC（实时通信）相关错误。 |
| `rtmError` | （3）：RTM（实时消息）相关错误。 |
