ToolResultMessageBuilder
public class ToolResultMessageBuilder
源码Source
io/agentscope/core/tool/ToolResultMessageBuilder.java:30–52工具结果消息构建器,用于构建并配置目标实例。位于 io.agentscope.core.tool 包。核心成员包括 buildToolResultMsg。
Utility class for building tool result messages from ToolResultBlock objects.
This class handles the conversion of ToolResultBlock to Msg with ToolResultBlock, setting proper id and name from the original tool call.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static Msg buildToolResultMsg(ToolResultBlock result, ToolUseBlock originalCall, String agentName)static | 构建工具结果消息。 Build a tool result message from a ToolResultBlock and the original tool call. |
方法详情Method Detail
buildToolResultMsg
public static Msg buildToolResultMsg(ToolResultBlock result, ToolUseBlock originalCall, String agentName)
static
构建工具结果消息。
Build a tool result message from a ToolResultBlock and the original tool call.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
result | ToolResultBlock | 工具执行结果。The tool execution result |
originalCall | ToolUseBlock | original 调用(类型 `ToolUseBlock`)。The original tool use block that triggered the execution |
agentName | String | 智能体名称(类型 `String`)。The name of the agent creating this message |
Msg返回消息。Msg containing the tool result
源码Source
io/agentscope/core/tool/ToolResultMessageBuilder.java:40–51