# 结构体 (/zh-CN/api-reference/conversational-ai/restclient-java/struct)
> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).
## ConvoAIConfig [#convoaiconfig]
```java
public class ConvoAIConfig {
private final String appId;
private final Credential credential;
private final DomainArea domainArea;
private final HttpProperty httpProperty;
private final ConvoAIServiceRegionEnum serviceRegion;
public static class Builder {
private String appId;
private Credential credential;
private DomainArea domainArea;
private HttpProperty httpProperty;
private ConvoAIServiceRegionEnum serviceRegion;
public Builder appId(String appId) {
this.appId = appId;
return this;
}
public Builder credential(Credential credential) {
this.credential = credential;
return this;
}
public Builder domainArea(DomainArea domainArea) {
this.domainArea = domainArea;
return this;
}
public Builder httpProperty(HttpProperty httpProperty) {
this.httpProperty = httpProperty;
return this;
}
public Builder serverRegion(ConvoAIServiceRegionEnum serverRegion) {
this.serviceRegion = serverRegion;
return this;
}
public ConvoAIConfig build() {
if (httpProperty == null) {
this.httpProperty = HttpProperty.builder().build();
}
return new ConvoAIConfig(this);
}
}
}
```
用于配置对话式智能体引擎客户端。
:::info[信息]
自 v0.3.0 版本新增。
:::
#### 成员参数 [#成员参数]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `appId` | `String` | 声网 App ID。 |
| `credential` | `Credential` | [struct-java-html-0-2-2 details](#table-slot-struct-java-html-0-2-2) |
| `domainArea` | `DomainArea` | REST Client 的域名区域,详见 [`DomainArea`](/zh-CN/api-reference/conversational-ai/restclient-java/enum#domainarea)。 |
| `httpProperty` | `HttpProperty` | REST Client 的 HTTP 属性。详见 [`HttpProperty`](/zh-CN/api-reference/conversational-ai/restclient-java/struct#httpproperty)。 |
| `serviceRegion` | `ConvoAIServiceRegionEnum` | 对话式智能体引擎的服务区域,详见 [`ConvoAIServiceRegionEnum`](/zh-CN/api-reference/conversational-ai/restclient-java/enum#convoaiserviceregionenum)。 |
**struct-java-html-0-2-2 details**
用于访问声网服务的身份凭据。可用的凭据类型:
- [`BasicAuthCredential`](/zh-CN/api-reference/conversational-ai/restclient-java/basicauthcredential),详见 [`BasicAuthCredential`](/zh-CN/api-reference/conversational-ai/restclient-java/basicauthcredential)。
## Properties [#properties]
```java
public static class Properties {
@JsonProperty("token")
private String token;
@JsonProperty("channel")
private String channel;
@JsonProperty("agent_rtc_uid")
private String agentRtcUId;
@JsonProperty("remote_rtc_uids")
private List remoteRtcUIds;
@JsonProperty("enable_string_uid")
private Boolean enableStringUId;
@JsonProperty("idle_timeout")
private Integer idleTimeout;
@JsonProperty("agent_rtm_uid")
private String agentRtmUId;
@JsonProperty("advanced_features")
private AdvancedFeatures advancedFeatures;
@JsonProperty("llm")
private LLMPayload llmPayload;
@JsonProperty("tts")
private TTSPayload ttsPayload;
@JsonProperty("vad")
private VADPayload vadPayload;
@JsonProperty("asr")
private ASRPayload asrPayload;
@JsonProperty("parameters")
private Map parameters;
}
```
配置智能体加入实时音视频频道的参数。
:::info[信息]
自 v0.3.0 版本新增。
:::
#### 成员参数 [#成员参数-1]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `token` | `String` | (可选)用于加入实时音视频频道的 Token,即用于身份验证的动态密钥。如果项目启用了 App 证书,必须通过该字段传入动态密钥。 |
| `channel` | `String` | (必填)智能体加入的实时音视频频道名称。 |
| `agentRtcUId` | `String` | (必填)智能体在实时音视频频道中的用户 ID。填入 "0" 表示由系统随机分配,此时需要相应地修改 `token`。 |
| `remoteRtcUIds` | `List` | (必填)智能体在实时音视频频道中订阅的用户 ID 列表。仅订阅的用户可以与智能体进行交互。传入 "*" 表示订阅频道内所有用户。 |
| `enableStringUId` | `Boolean` | [struct-java-html-1-5-2 details](#table-slot-struct-java-html-1-5-2) |
| `idleTimeout` | `Integer` | (可选)频道的最大空闲时间(秒)。当 `remote_rtc_uids` 中所有用户离开频道后开始计时,若超过设定的最大值,智能体将自动停止并退出频道。设为 0 表示仅在手动退出时智能体才停止。 |
| `agentRtmUId` | `String` | 智能体在实时消息频道中的用户 ID。仅当 `advancedFeatures.enable_rtm` 为 `true` 时有效。 |
| `advancedFeatures` | `AdvancedFeatures` | (可选)高级功能配置。详见 [`AdvancedFeatures`](/zh-CN/api-reference/conversational-ai/restclient-java/struct#advancedfeatures)。 |
| `llmPayload` | `LLMPayload` | (必填)自定义语言模型(LLM)配置。详见 [`LLMPayload`](/zh-CN/api-reference/conversational-ai/restclient-java/struct#llmpayload)。 |
| `ttsPayload` | `TTSPayload` | (可选)文本转语音(TTS)模块配置。详见 [`TTSPayload`](/zh-CN/api-reference/conversational-ai/restclient-java/struct#ttspayload)。 |
| `vadPayload` | `VADPayload` | (可选)语音活动检测(VAD)配置。详见 [`VADPayload`](/zh-CN/api-reference/conversational-ai/restclient-java/struct#vadpayload)。 |
| `asrPayload` | `ASRPayload` | (可选)自动语音识别(ASR)配置。详见 [`ASRPayload`](/zh-CN/api-reference/conversational-ai/restclient-java/struct#asrpayload)。 |
| `parameters` | `Map` | 自定义参数配置。 |
**struct-java-html-1-5-2 details**
(可选)是否启用字符串 UID。
- `true`:启用字符串 UID。
- `false`:(默认)不启用字符串 UID。
## AdvancedFeatures [#advancedfeatures]
```java
public static class AdvancedFeatures {
@JsonProperty("enable_aivad")
private Boolean enableAIVad;
@JsonProperty("enable_rtm")
private Boolean enableRtm;
@JsonProperty("enable_mllm")
private Boolean enableMLLM;
}
```
配置智能体加入 RTC 频道时的高级功能。
:::info[信息]
自 v0.3.0 版本新增。
:::
#### 成员参数 [#成员参数-2]
| 参数 | 数据类型 | 描述 |
| --- | --- | --- |
| `enableAIVad` | `Boolean` | [struct-java-html-2-1-2 details](#table-slot-struct-java-html-2-1-2) |
| `enableRtm` | `Boolean` | [struct-java-html-2-2-2 details](#table-slot-struct-java-html-2-2-2) |
| `enableMLLM` | `Boolean` | [struct-java-html-2-3-2 details](#table-slot-struct-java-html-2-3-2) |
**struct-java-html-2-1-2 details**
是否启用自然中断功能(AIVAD)。
- `true`:启用。你可以在任何时候中断智能体并快速响应,实现自然的过渡与流畅的对话。
- `false`:(默认)不启用。
**struct-java-html-2-2-2 details**
是否启用 Real-time Messaging(RTM)模块。
- `true`:启用。智能体可以使用 RTM 提供的能力来实现某些高级功能。
- `false`:(默认)不启用。
**struct-java-html-2-3-2 details**
是否启用多模态大语言模型。
- `true`:启用。
- `false`:禁用(默认)。
启用多模态大语言模型将自动禁用 `ASR`、`LLM` 和 `TTS`。当该参数设置为 `true` 时,`enable_aivad` 也将被禁用。
## LLMPayload [#llmpayload]
```java
public static class LLMPayload {
@JsonProperty("url")
private String url;
@JsonProperty("api_key")
private String apiKey;
@JsonProperty("system_messages")
private List