Builder
public static class Builder
源码Source
io/agentscope/core/tool/subagent/SubAgentConfig.java:153–241SubAgentConfig的构建器。位于 io.agentscope.core.tool.subagent 包。核心成员包括 toolName、description、forwardEvents、streamOptions、stateStore、build。
Builder for SubAgentConfig.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder toolName(String toolName) | 设置工具名称。 Sets the tool name. |
public Builder description(String description) | 设置该配置项。 Sets the tool description. |
public Builder forwardEvents(boolean forwardEvents) | 设置该配置项。 Sets whether to forward sub-agent events to the parent agent. |
public Builder streamOptions(StreamOptions streamOptions) | 设置流选项。 Sets the stream options for event forwarding. |
public Builder stateStore(AgentStateStore stateStore) | 设置会话用于会话状态管理。 Sets the session for conversation state management. |
public SubAgentConfig build() | 构建配置。 Builds the configuration. |
方法详情Method Detail
toolName
public Builder toolName(String toolName)
设置工具名称。
Sets the tool name.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
toolName | String | 工具名称。The tool name |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/tool/subagent/SubAgentConfig.java:170–173description
public Builder description(String description)
设置该配置项。
Sets the tool description.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
description | String | 描述(类型 `String`)。The description |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/tool/subagent/SubAgentConfig.java:183–186forwardEvents
public Builder forwardEvents(boolean forwardEvents)
设置该配置项。
Sets whether to forward sub-agent events to the parent agent.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
forwardEvents | boolean | forward 事件(类型 `boolean`)。true to forward events (default: true) |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/tool/subagent/SubAgentConfig.java:197–200streamOptions
public Builder streamOptions(StreamOptions streamOptions)
设置流选项。
Sets the stream options for event forwarding.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
streamOptions | StreamOptions | 流选项(类型 `StreamOptions`)。The stream options (null for defaults) |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/tool/subagent/SubAgentConfig.java:211–214stateStore
public Builder stateStore(AgentStateStore stateStore)
设置会话用于会话状态管理。
Sets the session for conversation state management.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
stateStore | AgentStateStore | 状态存储实例。The state store instance |
Builder返回当前实例,以支持链式调用。This builder
源码Source
io/agentscope/core/tool/subagent/SubAgentConfig.java:228–231build
public SubAgentConfig build()
构建配置。
Builds the configuration.
SubAgentConfig返回SubAgentConfig。New SubAgentConfig instance
源码Source
io/agentscope/core/tool/subagent/SubAgentConfig.java:238–240