Tool
public abstract class Tool
源码Source
io/agentscope/runtime/sandbox/tools/Tool.java:18–49工具,封装可被智能体调用的能力。位于 io.agentscope.runtime.sandbox.tools 包。核心成员包括 getName、getToolType、getDescription、toString、Tool、name。
A class in io.agentscope.runtime.sandbox.tools that lets agents invoke external capabilities under control. Declared in io.agentscope.runtime.sandbox.tools.
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
name | String | 名称字段。 The name field. |
toolType | String | 工具类型字段。 The tool type field. |
description | String | `description` 字段。 The description field. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
protected Tool(String name, String toolType, String description) | 初始化 `Tool` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getName() | 获取名称。 Returns the name. |
public String getToolType() | 获取工具类型。 Returns the tool type. |
public String getDescription() | 获取 `getDescription`。 Returns the description. |
public String toString() | 返回 `toString` 结果。 Returns the to string. |
字段详情Field Detail
name
protected String name
名称字段。声明为 protected String name。
The name field.
源码Source
io/agentscope/runtime/sandbox/tools/Tool.java:20toolType
protected String toolType
工具类型字段。声明为 protected String toolType。
The tool type field.
源码Source
io/agentscope/runtime/sandbox/tools/Tool.java:22description
protected String description
description 字段。声明为 protected String description。
The description field.
源码Source
io/agentscope/runtime/sandbox/tools/Tool.java:24构造器详情Constructor Detail
Tool
protected Tool(String name, String toolType, String description)
初始化 Tool 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
toolType | String | 工具类型(类型 `String`)。The tool type. |
description | String | 描述(类型 `String`)。The description. |
源码Source
io/agentscope/runtime/sandbox/tools/Tool.java:26–30方法详情Method Detail
getName
public String getName()
获取名称。
Returns the name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/sandbox/tools/Tool.java:32–34getToolType
public String getToolType()
获取工具类型。
Returns the tool type.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/sandbox/tools/Tool.java:36–38getDescription
public String getDescription()
获取 getDescription。
Returns the description.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/sandbox/tools/Tool.java:40–42toString
public String toString()
返回 toString 结果。
Returns the to string.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/runtime/sandbox/tools/Tool.java:44–48