AS AgentScopeAPI 手册 / API Reference

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
resultToolResultBlock工具执行结果。The tool execution result
originalCallToolUseBlockoriginal 调用(类型 `ToolUseBlock`)。The original tool use block that triggered the execution
agentNameString智能体名称(类型 `String`)。The name of the agent creating this message
返回Returns Msg
返回消息。Msg containing the tool result
源码Source io/agentscope/core/tool/ToolResultMessageBuilder.java:40–51
基于官方固定版本源码静态生成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.