AS AgentScopeAPI 手册 / API Reference

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
nameString组名称(必填)。The group name (required)
返回Returns Builder
返回当前实例,以支持链式调用。This builder for method chaining
源码Source io/agentscope/core/tool/SkillToolGroup.java:120–123

description

public Builder description(String description)

设置该配置项。

Sets the base description of the tool group.

参数Parameters
名称Name类型Type说明Description
descriptionString描述(类型 `String`)。The group description
返回Returns Builder
返回当前实例,以支持链式调用。This builder for method chaining
源码Source io/agentscope/core/tool/SkillToolGroup.java:131–134

active

public Builder active(boolean active)

设置该配置项。

Sets the initial activation state.

参数Parameters
名称Name类型Type说明Description
activebooleanactive(类型 `boolean`)。true for active, false for inactive (default)
返回Returns Builder
返回当前实例,以支持链式调用。This builder for method chaining
源码Source io/agentscope/core/tool/SkillToolGroup.java:142–145

activateOnSkill

public Builder activateOnSkill(String skillName)

设置该配置项。

Sets the skill that this tool group is bound to.

参数Parameters
名称Name类型Type说明Description
skillNameString技能名称(必填)。The skill name (required)
返回Returns Builder
返回当前实例,以支持链式调用。This builder for method chaining
源码Source io/agentscope/core/tool/SkillToolGroup.java:153–156

tools

public Builder tools(Set<String> tools)

设置工具。

Sets the initial set of tools in this group.

参数Parameters
名称Name类型Type说明Description
toolsSet<String>工具列表(类型 `Set`)。The tool names (a defensive copy will be made)
返回Returns Builder
返回当前实例,以支持链式调用。This builder for method chaining
源码Source io/agentscope/core/tool/SkillToolGroup.java:164–167

build

public SkillToolGroup build()

构建并返回最终实例。

Builds a new SkillToolGroup with the configured settings.

返回Returns SkillToolGroup
一种新的SkillToolGroup 实例。A new SkillToolGroup instance
抛出Throws
  • NullPointerException 可能抛出 `NullPointerException`。if name or activateOnSkill is null
源码Source io/agentscope/core/tool/SkillToolGroup.java:175–177
基于官方固定版本源码静态生成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.