AguiTool
public class AguiTool
源码Source
io/agentscope/core/agui/model/AguiTool.java:31–109表示工具定义,使用 AG-UI 协议。位于 io.agentscope.core.agui.model 包。核心成员包括 getName、getDescription、getParameters、toString、equals、hashCode。
Represents a tool definition in the AG-UI protocol.
Tools are functions that the agent can call to perform actions or retrieve information. This class defines the tool's interface including its name, description, and parameter schema.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public AguiTool(String name, String description, Map<String, Object> parameters) | 创建新的AguiTool。 Creates a new AguiTool. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getName() | 获取工具名称。 Get the tool name. |
public String getDescription() | 获取 `getDescription`。 Get the tool description. |
public Map<String, Object> getParameters() | 获取参数 JSON 模式。 Get the parameters JSON Schema. |
public String toString() | 返回 `toString` 结果。 Returns the to string. |
public boolean equals(Object o) | 设置该参数。 Performs the equals operation. |
public int hashCode() | 返回 `hashCode` 结果。 Returns the hash code. |
构造器详情Constructor Detail
AguiTool
public AguiTool(String name, String description, Map<String, Object> parameters)
创建新的AguiTool。
Creates a new AguiTool.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 工具名称。The tool name |
description | String | 描述(类型 `String`)。The tool description |
parameters | Map<String, Object> | 参数 JSON 模式。The parameters JSON Schema |
源码Source
io/agentscope/core/agui/model/AguiTool.java:44–55方法详情Method Detail
getName
public String getName()
获取工具名称。
Get the tool name.
String工具名称。The tool name
源码Source
io/agentscope/core/agui/model/AguiTool.java:62–64getDescription
public String getDescription()
获取 getDescription。
Get the tool description.
String返回字符串结果。The tool description
源码Source
io/agentscope/core/agui/model/AguiTool.java:71–73getParameters
public Map<String, Object> getParameters()
获取参数 JSON 模式。
Get the parameters JSON Schema.
Map<String, Object>参数模式 as 不可变映射。The parameters schema as an immutable map
源码Source
io/agentscope/core/agui/model/AguiTool.java:80–82toString
public String toString()
返回 toString 结果。
Returns the to string.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agui/model/AguiTool.java:84–93equals
public boolean equals(Object o)
设置该参数。
Performs the equals operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
o | Object | o(类型 `Object`)。The o. |
boolean返回布尔值,表示判断结果。Returns a boolean result.
源码Source
io/agentscope/core/agui/model/AguiTool.java:95–103hashCode
public int hashCode()
返回 hashCode 结果。
Returns the hash code.
int返回数值结果。Returns a numeric result.
源码Source
io/agentscope/core/agui/model/AguiTool.java:105–108