AS AgentScopeAPI 手册 / API Reference

ToolCallResult

record ToolCallResult( String threadId, String runId, String toolCallId, String content, String role, String messageId, Long timestamp, Object rawEvent) implements AguiEvent
源码Source io/agentscope/core/agui/event/AguiEvent.java:557–621

承载工具调用结果数据的记录类型。位于 io.agentscope.core.agui.event 包,实现 AguiEvent。核心成员包括 threadId、runId、toolCallId、content、role、messageId。

Event containing the result of a tool call.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
threadIdString
执行会话线程标识相关操作。
Performs the thread id operation.
runIdString
运行标识。
Runs the id.
toolCallIdString
执行工具调用标识相关操作。
Performs the tool call id operation.
contentString
执行内容相关操作。
Performs the content operation.
roleString
执行角色相关操作。
Performs the role operation.
messageIdString
执行消息标识相关操作。
Performs the message id operation.
timestampLong
执行时间戳相关操作。
Performs the timestamp operation.
rawEventObject
执行原始事件相关操作。
Performs the raw event operation.

构造器摘要Constructor Summary

构造器Constructor说明Description
public ToolCallResult(String threadId, String runId, String toolCallId, String content, String role, String messageId, Long timestamp, Object rawEvent)
初始化 `ToolCallResult` 实例。
Creates a new instance.
public ToolCallResult(String threadId, String runId, String toolCallId, String content, String role, String messageId)
初始化 `ToolCallResult` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public AguiEventType getType()
获取类型。
Returns the type.
public String getThreadId()
获取会话线程标识。
Returns the thread id.
public String getRunId()
获取运行标识。
Returns the run id.
public String getRole()
获取角色。
Returns the role.
public String getMessageId()
获取消息标识。
Returns the message id.

记录组件详情Record Component Detail

threadId

String threadId

执行会话线程标识相关操作。

Performs the thread id operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:557–621

runId

String runId

运行标识。

Runs the id.

源码Source io/agentscope/core/agui/event/AguiEvent.java:557–621

toolCallId

String toolCallId

执行工具调用标识相关操作。

Performs the tool call id operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:557–621

content

String content

执行内容相关操作。

Performs the content operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:557–621

role

String role

执行角色相关操作。

Performs the role operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:557–621

messageId

String messageId

执行消息标识相关操作。

Performs the message id operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:557–621

timestamp

Long timestamp

执行时间戳相关操作。

Performs the timestamp operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:557–621

rawEvent

Object rawEvent

执行原始事件相关操作。

Performs the raw event operation.

源码Source io/agentscope/core/agui/event/AguiEvent.java:557–621

构造器详情Constructor Detail

ToolCallResult

public ToolCallResult(String threadId, String runId, String toolCallId, String content, String role, String messageId, Long timestamp, Object rawEvent)

初始化 ToolCallResult 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
threadIdString会话线程标识(类型 `String`)。The thread id.
runIdString运行标识(类型 `String`)。The run id.
toolCallIdString工具调用标识(类型 `String`)。The tool call id.
contentString内容(类型 `String`)。The content.
roleString角色(类型 `String`)。The role.
messageIdString消息标识(类型 `String`)。The message id.
timestampLong时间戳(类型 `Long`)。The timestamp.
rawEventObject原始事件(类型 `Object`)。The raw event.
源码Source io/agentscope/core/agui/event/AguiEvent.java:568–587

ToolCallResult

public ToolCallResult(String threadId, String runId, String toolCallId, String content, String role, String messageId)

初始化 ToolCallResult 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
threadIdString会话线程标识(类型 `String`)。The thread id.
runIdString运行标识(类型 `String`)。The run id.
toolCallIdString工具调用标识(类型 `String`)。The tool call id.
contentString内容(类型 `String`)。The content.
roleString角色(类型 `String`)。The role.
messageIdString消息标识(类型 `String`)。The message id.
源码Source io/agentscope/core/agui/event/AguiEvent.java:589–597

方法详情Method Detail

getType

public AguiEventType getType()

获取类型。

Returns the type.

返回Returns AguiEventType
返回AguiEventType。Returns agui event type.
源码Source io/agentscope/core/agui/event/AguiEvent.java:599–602

getThreadId

public String getThreadId()

获取会话线程标识。

Returns the thread id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/event/AguiEvent.java:604–607

getRunId

public String getRunId()

获取运行标识。

Returns the run id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/event/AguiEvent.java:609–612

getRole

public String getRole()

获取角色。

Returns the role.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/event/AguiEvent.java:614–616

getMessageId

public String getMessageId()

获取消息标识。

Returns the message id.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/event/AguiEvent.java:618–620

继承成员Inherited Members

继承自Methods inherited from AguiEvent
基于官方固定版本源码静态生成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.