AS AgentScopeAPI 手册 / API Reference

ChannelConfigEntry

@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public class ChannelConfigEntry
源码Source 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.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/coding/config/ChannelConfigEntry.java:87–89

setDefaultAgentId

public void setDefaultAgentId(String defaultAgentId)

设置默认智能体标识。

Sets the default agent id.

参数Parameters
名称Name类型Type说明Description
defaultAgentIdString默认智能体标识(类型 `String`)。The default agent id.
源码Source io/agentscope/harness/coding/config/ChannelConfigEntry.java:91–93

getDmScope

public String getDmScope()

获取Dm 范围。

Returns the dm scope.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/coding/config/ChannelConfigEntry.java:95–97

setDmScope

public void setDmScope(String dmScope)

设置Dm 范围。

Sets the dm scope.

参数Parameters
名称Name类型Type说明Description
dmScopeStringdm 范围(类型 `String`)。The dm scope.
源码Source io/agentscope/harness/coding/config/ChannelConfigEntry.java:99–101

getDisabled

public Boolean getDisabled()

获取已禁用。

Returns the disabled.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/coding/config/ChannelConfigEntry.java:103–105

setDisabled

public void setDisabled(Boolean disabled)

设置已禁用。

Sets the disabled.

参数Parameters
名称Name类型Type说明Description
disabledBoolean已禁用(类型 `Boolean`)。The disabled.
源码Source io/agentscope/harness/coding/config/ChannelConfigEntry.java:107–109

getProperties

public Map<String, Object> getProperties()

获取属性。

Returns the properties.

返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/harness/coding/config/ChannelConfigEntry.java:111–113

setProperties

public void setProperties(Map<String, Object> properties)

设置属性。

Sets the properties.

参数Parameters
名称Name类型Type说明Description
propertiesMap<String, Object>属性(类型 `Map`)。The properties.
源码Source io/agentscope/harness/coding/config/ChannelConfigEntry.java:115–117

toChannelConfig

public ChannelConfig toChannelConfig(String channelId)

设置到渠道配置。

Converts this entry into a ChannelConfig for the given channel id.

参数Parameters
名称Name类型Type说明Description
channelIdString渠道标识(类型 `String`)。The channel id.
返回Returns ChannelConfig
返回ChannelConfig。Returns channel config.
源码Source io/agentscope/harness/coding/config/ChannelConfigEntry.java:120–133
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.