AguiToolCall
public class AguiToolCall
源码Source
io/agentscope/core/agui/model/AguiToolCall.java:28–107表示工具调用,使用 AG-UI 协议。位于 io.agentscope.core.agui.model 包。核心成员包括 getId、getType、getFunction、toString、equals、hashCode。
Represents a tool call in the AG-UI protocol.
Tool calls are used in assistant messages to indicate that the agent wants to invoke a tool. They contain an ID, type, and function details.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public AguiToolCall(String id, String type, AguiFunctionCall function) | 创建新的AguiToolCall。 Creates a new AguiToolCall. |
public AguiToolCall(String id, AguiFunctionCall function) | 创建新的AguiToolCall 使用类型"函数"。 Creates a new AguiToolCall with type "function". |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public String getId() | 获取工具调用标识。 Get the tool call ID. |
public String getType() | 获取工具调用类型。 Get the tool call type. |
public AguiFunctionCall getFunction() | 获取函数调用详情。 Get the function call details. |
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
AguiToolCall
public AguiToolCall(String id, String type, AguiFunctionCall function)
创建新的AguiToolCall。
Creates a new AguiToolCall.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The unique tool call ID |
type | String | 类型(类型 `String`)。The tool call type (typically "function") |
function | AguiFunctionCall | 函数调用详情。The function call details |
源码Source
io/agentscope/core/agui/model/AguiToolCall.java:41–49AguiToolCall
public AguiToolCall(String id, AguiFunctionCall function)
创建新的AguiToolCall 使用类型"函数"。
Creates a new AguiToolCall with type "function".
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The unique tool call ID |
function | AguiFunctionCall | 函数调用详情。The function call details |
源码Source
io/agentscope/core/agui/model/AguiToolCall.java:57–59方法详情Method Detail
getId
public String getId()
获取工具调用标识。
Get the tool call ID.
String工具调用标识。The tool call ID
源码Source
io/agentscope/core/agui/model/AguiToolCall.java:66–68getType
public String getType()
获取工具调用类型。
Get the tool call type.
String返回字符串结果。The type (typically "function")
源码Source
io/agentscope/core/agui/model/AguiToolCall.java:75–77getFunction
public AguiFunctionCall getFunction()
获取函数调用详情。
Get the function call details.
AguiFunctionCall函数调用。The function call
源码Source
io/agentscope/core/agui/model/AguiToolCall.java:84–86toString
public String toString()
返回 toString 结果。
Returns the to string.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agui/model/AguiToolCall.java:88–91equals
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/AguiToolCall.java:93–101hashCode
public int hashCode()
返回 hashCode 结果。
Returns the hash code.
int返回数值结果。Returns a numeric result.
源码Source
io/agentscope/core/agui/model/AguiToolCall.java:103–106