Builder
public static class Builder
源码Source
io/agentscope/core/tool/SkillToolGroup.java:106–178构建器,用于构建并配置目标实例。位于 io.agentscope.core.tool 包。核心成员包括 name、description、active、activateOnSkill、tools、build。
Builder for constructing SkillToolGroup instances.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Builder name(String name) | 设置名称的工具组。 Sets the name of the tool group. |
public Builder description(String description) | 设置该配置项。 Sets the base description of the tool group. |
public Builder active(boolean active) | 设置该配置项。 Sets the initial activation state. |
public Builder activateOnSkill(String skillName) | 设置该配置项。 Sets the skill that this tool group is bound to. |
public Builder tools(Set<String> tools) | 设置工具。 Sets the initial set of tools in this group. |
public SkillToolGroup build() | 构建并返回最终实例。 Builds a new SkillToolGroup with the configured settings. |
方法详情Method Detail
name
public Builder name(String name)
设置名称的工具组。
Sets the name of the tool group.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 组名称(必填)。The group name (required) |
Builder返回当前实例,以支持链式调用。This builder for method chaining
源码Source
io/agentscope/core/tool/SkillToolGroup.java:120–123description
public Builder description(String description)
设置该配置项。
Sets the base description of the tool group.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
description | String | 描述(类型 `String`)。The group description |
Builder返回当前实例,以支持链式调用。This builder for method chaining
源码Source
io/agentscope/core/tool/SkillToolGroup.java:131–134active
public Builder active(boolean active)
设置该配置项。
Sets the initial activation state.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
active | boolean | active(类型 `boolean`)。true for active, false for inactive (default) |
Builder返回当前实例,以支持链式调用。This builder for method chaining
源码Source
io/agentscope/core/tool/SkillToolGroup.java:142–145activateOnSkill
public Builder activateOnSkill(String skillName)
设置该配置项。
Sets the skill that this tool group is bound to.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
skillName | String | 技能名称(必填)。The skill name (required) |
Builder返回当前实例,以支持链式调用。This builder for method chaining
源码Source
io/agentscope/core/tool/SkillToolGroup.java:153–156tools
public Builder tools(Set<String> tools)
设置工具。
Sets the initial set of tools in this group.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
tools | Set<String> | 工具列表(类型 `Set`)。The tool names (a defensive copy will be made) |
Builder返回当前实例,以支持链式调用。This builder for method chaining
源码Source
io/agentscope/core/tool/SkillToolGroup.java:164–167build
public SkillToolGroup build()
构建并返回最终实例。
Builds a new SkillToolGroup with the configured settings.
SkillToolGroup一种新的SkillToolGroup 实例。A new SkillToolGroup instance
NullPointerException可能抛出 `NullPointerException`。if name or activateOnSkill is null
源码Source
io/agentscope/core/tool/SkillToolGroup.java:175–177