AS AgentScopeAPI 手册 / API Reference

ChannelConfigEntry

@JsonInclude(JsonInclude.Include.NON_EMPTY) @JsonIgnoreProperties(ignoreUnknown = true) public class ChannelConfigEntry
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:54–195

渠道配置条目,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.runtime.config 包。核心成员包括 getType、setType、getOwnerId、setOwnerId、getProperties、setProperties。

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 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 getType()
获取类型。
Returns the type.
public void setType(String type)
设置类型。
Sets the type.
public String getOwnerId()
获取所有者标识。
Returns the owner id.
public void setOwnerId(String ownerId)
设置所有者标识。
Sets the owner id.
public Map<String, Object> getProperties()
获取属性。
Returns the properties.
public void setProperties(Map<String, Object> properties)
设置属性。
Sets the properties.
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 List<BindingConfigEntry> getBindings()
获取 `getBindings`。
Returns the bindings.
public void setBindings(List<BindingConfigEntry> bindings)
设置 `setBindings`。
Sets the bindings.
public ChannelConfig toChannelConfig(String channelId)
设置到渠道配置。
Converts this entry into a `ChannelConfig` for the given channel id.

方法详情Method Detail

getType

public String getType()

获取类型。

Returns the type.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:112–114

setType

public void setType(String type)

设置类型。

Sets the type.

参数Parameters
名称Name类型Type说明Description
typeString类型(类型 `String`)。The type.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:116–118

getOwnerId

public String getOwnerId()

获取所有者标识。

Returns the owner id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:120–122

setOwnerId

public void setOwnerId(String ownerId)

设置所有者标识。

Sets the owner id.

参数Parameters
名称Name类型Type说明Description
ownerIdString所有者标识(类型 `String`)。The owner id.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:124–126

getProperties

public Map<String, Object> getProperties()

获取属性。

Returns the properties.

返回Returns Map<String, Object>
返回映射。Returns map.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:128–130

setProperties

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

设置属性。

Sets the properties.

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

getDefaultAgentId

public String getDefaultAgentId()

获取默认智能体标识。

Returns the default agent id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:136–138

setDefaultAgentId

public void setDefaultAgentId(String defaultAgentId)

设置默认智能体标识。

Sets the default agent id.

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

getDmScope

public String getDmScope()

获取Dm 范围。

Returns the dm scope.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:144–146

setDmScope

public void setDmScope(String dmScope)

设置Dm 范围。

Sets the dm scope.

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

getDisabled

public Boolean getDisabled()

获取已禁用。

Returns the disabled.

返回Returns Boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:152–154

setDisabled

public void setDisabled(Boolean disabled)

设置已禁用。

Sets the disabled.

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

getBindings

public List<BindingConfigEntry> getBindings()

获取 getBindings。

Returns the bindings.

返回Returns List<BindingConfigEntry>
返回列出。Returns list.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:160–162

setBindings

public void setBindings(List<BindingConfigEntry> bindings)

设置 setBindings。

Sets the bindings.

参数Parameters
名称Name类型Type说明Description
bindingsList<BindingConfigEntry>bindings(类型 `List`)。The bindings.
源码Source io/agentscope/builder/runtime/config/ChannelConfigEntry.java:164–166

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/builder/runtime/config/ChannelConfigEntry.java:169–194
基于官方固定版本源码静态生成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.