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 |
|---|---|---|
threadId | String | 执行会话线程标识相关操作。 Performs the thread id operation. |
runId | String | 运行标识。 Runs the id. |
toolCallId | String | 执行工具调用标识相关操作。 Performs the tool call id operation. |
content | String | 执行内容相关操作。 Performs the content operation. |
role | String | 执行角色相关操作。 Performs the role operation. |
messageId | String | 执行消息标识相关操作。 Performs the message id operation. |
timestamp | Long | 执行时间戳相关操作。 Performs the timestamp operation. |
rawEvent | Object | 执行原始事件相关操作。 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–621runId
String runId运行标识。
Runs the id.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:557–621toolCallId
String toolCallId执行工具调用标识相关操作。
Performs the tool call id operation.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:557–621content
String content执行内容相关操作。
Performs the content operation.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:557–621role
String role执行角色相关操作。
Performs the role operation.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:557–621messageId
String messageId执行消息标识相关操作。
Performs the message id operation.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:557–621timestamp
Long timestamp执行时间戳相关操作。
Performs the timestamp operation.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:557–621rawEvent
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 |
|---|---|---|
threadId | String | 会话线程标识(类型 `String`)。The thread id. |
runId | String | 运行标识(类型 `String`)。The run id. |
toolCallId | String | 工具调用标识(类型 `String`)。The tool call id. |
content | String | 内容(类型 `String`)。The content. |
role | String | 角色(类型 `String`)。The role. |
messageId | String | 消息标识(类型 `String`)。The message id. |
timestamp | Long | 时间戳(类型 `Long`)。The timestamp. |
rawEvent | Object | 原始事件(类型 `Object`)。The raw event. |
源码Source
io/agentscope/core/agui/event/AguiEvent.java:568–587ToolCallResult
public ToolCallResult(String threadId, String runId, String toolCallId, String content, String role, String messageId)
初始化 ToolCallResult 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
threadId | String | 会话线程标识(类型 `String`)。The thread id. |
runId | String | 运行标识(类型 `String`)。The run id. |
toolCallId | String | 工具调用标识(类型 `String`)。The tool call id. |
content | String | 内容(类型 `String`)。The content. |
role | String | 角色(类型 `String`)。The role. |
messageId | String | 消息标识(类型 `String`)。The message id. |
源码Source
io/agentscope/core/agui/event/AguiEvent.java:589–597方法详情Method Detail
getType
public AguiEventType getType()
获取类型。
Returns the type.
AguiEventType返回AguiEventType。Returns agui event type.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:599–602getThreadId
public String getThreadId()
获取会话线程标识。
Returns the thread id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:604–607getRunId
public String getRunId()
获取运行标识。
Returns the run id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:609–612getRole
public String getRole()
获取角色。
Returns the role.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:614–616getMessageId
public String getMessageId()
获取消息标识。
Returns the message id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/agui/event/AguiEvent.java:618–620