AS AgentScopeAPI 手册 / API Reference

ToolExecResult

public record ToolExecResult(String content, boolean error)
源码Source io/agentscope/builder/web/managed/selfhosted/LocalHandsToolExecutor.java:388–392

承载工具 Exec 结果数据的记录类型。位于 io.agentscope.builder.web.managed.selfhosted 包。核心成员包括 content、error。

Result of a local hands tool execution.

记录组件摘要Record Component Summary

组件Component类型Type说明Description
contentString
执行内容相关操作。
Performs the content operation.
errorboolean
执行错误相关操作。
Performs the error operation.

方法摘要Method Summary

方法Method说明Description
public static ToolExecResult error(String message)
static
设置错误。
Performs the error operation.

记录组件详情Record Component Detail

content

String content

执行内容相关操作。

Performs the content operation.

源码Source io/agentscope/builder/web/managed/selfhosted/LocalHandsToolExecutor.java:388–392

error

boolean error

执行错误相关操作。

Performs the error operation.

源码Source io/agentscope/builder/web/managed/selfhosted/LocalHandsToolExecutor.java:388–392

方法详情Method Detail

error

public static ToolExecResult error(String message)
static

设置错误。

Performs the error operation.

参数Parameters
名称Name类型Type说明Description
messageString消息(类型 `String`)。The message.
返回Returns ToolExecResult
返回ToolExecResult。Returns tool exec result.
源码Source io/agentscope/builder/web/managed/selfhosted/LocalHandsToolExecutor.java:389–391
基于官方固定版本源码静态生成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.