AS AgentScopeAPI 手册 / API Reference

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
idString标识(类型 `String`)。The unique tool call ID
typeString类型(类型 `String`)。The tool call type (typically "function")
functionAguiFunctionCall函数调用详情。The function call details
源码Source io/agentscope/core/agui/model/AguiToolCall.java:41–49

AguiToolCall

public AguiToolCall(String id, AguiFunctionCall function)

创建新的AguiToolCall 使用类型"函数"。

Creates a new AguiToolCall with type "function".

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。The unique tool call ID
functionAguiFunctionCall函数调用详情。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.

返回Returns String
工具调用标识。The tool call ID
源码Source io/agentscope/core/agui/model/AguiToolCall.java:66–68

getType

public String getType()

获取工具调用类型。

Get the tool call type.

返回Returns String
返回字符串结果。The type (typically "function")
源码Source io/agentscope/core/agui/model/AguiToolCall.java:75–77

getFunction

public AguiFunctionCall getFunction()

获取函数调用详情。

Get the function call details.

返回Returns AguiFunctionCall
函数调用。The function call
源码Source io/agentscope/core/agui/model/AguiToolCall.java:84–86

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/model/AguiToolCall.java:88–91

equals

public boolean equals(Object o)

设置该参数。

Performs the equals operation.

参数Parameters
名称Name类型Type说明Description
oObjecto(类型 `Object`)。The o.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/agui/model/AguiToolCall.java:93–101

hashCode

public int hashCode()

返回 hashCode 结果。

Returns the hash code.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/agui/model/AguiToolCall.java:103–106
基于官方固定版本源码静态生成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.