ToolResultEndEvent
public class ToolResultEndEvent extends AgentEvent
源码Source
io/agentscope/core/event/ToolResultEndEvent.java:23–88工具结果结束事件,描述执行过程中的事件。位于 io.agentscope.core.event 包,继承自 AgentEvent。核心成员包括 getType、getReplyId、getToolCallId、getToolCallName、getState、ToolResultEndEvent。
A class in io.agentscope.core.event that carries structured messages and events between agents, models and UIs. Declared in io.agentscope.core.event. Extends AgentEvent.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public ToolResultEndEvent(String id, String createdAt, String replyId, String toolCallId, String toolCallName, ToolResultState state, Map<String, Object> metadata) | 初始化 `ToolResultEndEvent` 实例。 Creates a new instance. |
public ToolResultEndEvent(String id, String createdAt, String replyId, String toolCallId, String toolCallName, ToolResultState state) | 初始化 `ToolResultEndEvent` 实例。 Backward-compatible constructor for callers that do not provide metadata. |
public ToolResultEndEvent(String replyId, String toolCallId, String toolCallName, ToolResultState state) | 初始化 `ToolResultEndEvent` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public AgentEventType getType() | 获取类型。 Returns the type. |
public String getReplyId() | 获取回复标识。 Returns the reply id. |
public String getToolCallId() | 获取工具调用标识。 Returns the tool call id. |
public String getToolCallName() | 获取工具调用名称。 Returns the tool call name. |
public ToolResultState getState() | 获取状态。 Returns the state. |
构造器详情Constructor Detail
ToolResultEndEvent
public ToolResultEndEvent(String id, String createdAt, String replyId, String toolCallId, String toolCallName, ToolResultState state, Map<String, Object> metadata)
初始化 ToolResultEndEvent 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
createdAt | String | 已创建 At(类型 `String`)。The created at. |
replyId | String | 回复标识(类型 `String`)。The reply id. |
toolCallId | String | 工具调用标识(类型 `String`)。The tool call id. |
toolCallName | String | 工具调用名称(类型 `String`)。The tool call name. |
state | ToolResultState | 状态对象(类型 `ToolResultState`)。The state. |
metadata | Map<String, Object> | 元数据(类型 `Map`)。The metadata. |
源码Source
io/agentscope/core/event/ToolResultEndEvent.java:30–45ToolResultEndEvent
public ToolResultEndEvent(String id, String createdAt, String replyId, String toolCallId, String toolCallName, ToolResultState state)
初始化 ToolResultEndEvent 实例。
Backward-compatible constructor for callers that do not provide metadata.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
id | String | 标识(类型 `String`)。The id. |
createdAt | String | 已创建 At(类型 `String`)。The created at. |
replyId | String | 回复标识(类型 `String`)。The reply id. |
toolCallId | String | 工具调用标识(类型 `String`)。The tool call id. |
toolCallName | String | 工具调用名称(类型 `String`)。The tool call name. |
state | ToolResultState | 状态对象(类型 `ToolResultState`)。The state. |
源码Source
io/agentscope/core/event/ToolResultEndEvent.java:50–58ToolResultEndEvent
public ToolResultEndEvent(String replyId, String toolCallId, String toolCallName, ToolResultState state)
初始化 ToolResultEndEvent 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
replyId | String | 回复标识(类型 `String`)。The reply id. |
toolCallId | String | 工具调用标识(类型 `String`)。The tool call id. |
toolCallName | String | 工具调用名称(类型 `String`)。The tool call name. |
state | ToolResultState | 状态对象(类型 `ToolResultState`)。The state. |
源码Source
io/agentscope/core/event/ToolResultEndEvent.java:60–66方法详情Method Detail
getType
public AgentEventType getType()
获取类型。
Returns the type.
AgentEventType返回AgentEventType。Returns agent event type.
源码Source
io/agentscope/core/event/ToolResultEndEvent.java:68–71getReplyId
public String getReplyId()
获取回复标识。
Returns the reply id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/event/ToolResultEndEvent.java:73–75getToolCallId
public String getToolCallId()
获取工具调用标识。
Returns the tool call id.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/event/ToolResultEndEvent.java:77–79getToolCallName
public String getToolCallName()
获取工具调用名称。
Returns the tool call name.
String返回字符串结果。Returns a string.
源码Source
io/agentscope/core/event/ToolResultEndEvent.java:81–83getState
public ToolResultState getState()
获取状态。
Returns the state.
ToolResultState返回ToolResultState。Returns tool result state.
源码Source
io/agentscope/core/event/ToolResultEndEvent.java:85–87