ChannelConfigEntry
@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public class ChannelConfigEntry
io/agentscope/harness/coding/config/ChannelConfigEntry.java:52–134渠道配置条目,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.coding.config 包。核心成员包括 getDefaultAgentId、setDefaultAgentId、getDmScope、setDmScope、getDisabled、setDisabled。
Per-channel section in agentscope.json under channels.<channelId>.
Defines routing configuration for a channel adapter. The built-in chatui channel is
automatically created from this entry if no programmatic CodingBootstrap.Builder#channel(io.agentscope.harness.agent.gateway.channel.Channel...) registration exists for
it. For other channel types, this entry provides the ChannelConfig routing rules that are
applied at bootstrap time.
Example
`"channels": {
"chatui": {
"defaultAgentId": "main",
"dmScope": "PER_PEER"
},
"slack": {
"defaultAgentId": "support",
"dmScope": "PER_PEER"
}
}
`
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getDefaultAgentId() | 获取默认智能体标识。 Returns the default agent id. |
public void setDefaultAgentId(String defaultAgentId) | 设置默认智能体标识。 Sets the default agent id. |
public String getDmScope() | 获取Dm 范围。 Returns the dm scope. |
public void setDmScope(String dmScope) | 设置Dm 范围。 Sets the dm scope. |
public Boolean getDisabled() | 获取已禁用。 Returns the disabled. |
public void setDisabled(Boolean disabled) | 设置已禁用。 Sets the disabled. |
public Map<String, Object> getProperties() | 获取属性。 Returns the properties. |
public void setProperties(Map<String, Object> properties) | 设置属性。 Sets the properties. |
public ChannelConfig toChannelConfig(String channelId) | 设置到渠道配置。 Converts this entry into a `ChannelConfig` for the given channel id. |
方法详情Method Detail
getDefaultAgentId
public String getDefaultAgentId()
获取默认智能体标识。
Returns the default agent id.
Stringio/agentscope/harness/coding/config/ChannelConfigEntry.java:87–89setDefaultAgentId
public void setDefaultAgentId(String defaultAgentId)
设置默认智能体标识。
Sets the default agent id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
defaultAgentId | String | 默认智能体标识(类型 `String`)。The default agent id. |
io/agentscope/harness/coding/config/ChannelConfigEntry.java:91–93getDmScope
public String getDmScope()
获取Dm 范围。
Returns the dm scope.
Stringio/agentscope/harness/coding/config/ChannelConfigEntry.java:95–97setDmScope
public void setDmScope(String dmScope)
设置Dm 范围。
Sets the dm scope.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
dmScope | String | dm 范围(类型 `String`)。The dm scope. |
io/agentscope/harness/coding/config/ChannelConfigEntry.java:99–101getDisabled
public Boolean getDisabled()
获取已禁用。
Returns the disabled.
Booleanio/agentscope/harness/coding/config/ChannelConfigEntry.java:103–105setDisabled
public void setDisabled(Boolean disabled)
设置已禁用。
Sets the disabled.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
disabled | Boolean | 已禁用(类型 `Boolean`)。The disabled. |
io/agentscope/harness/coding/config/ChannelConfigEntry.java:107–109getProperties
public Map<String, Object> getProperties()
获取属性。
Returns the properties.
Map<String, Object>io/agentscope/harness/coding/config/ChannelConfigEntry.java:111–113setProperties
public void setProperties(Map<String, Object> properties)
设置属性。
Sets the properties.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
properties | Map<String, Object> | 属性(类型 `Map`)。The properties. |
io/agentscope/harness/coding/config/ChannelConfigEntry.java:115–117toChannelConfig
public ChannelConfig toChannelConfig(String channelId)
设置到渠道配置。
Converts this entry into a ChannelConfig for the given channel id.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
ChannelConfigio/agentscope/harness/coding/config/ChannelConfigEntry.java:120–133