AS AgentScopeAPI 手册 / API Reference
类class agentscope.tool

ExecResult

@dataclass
class ExecResult
源码Source agentscope/tool/_builtin/_backend.py:62–83

Exec 结果,让智能体以受控方式调用外部能力。位于 agentscope.tool 包。核心成员包括 ok。

Result of running a shell command via a backend. Declared in agentscope.tool.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
exit_codeint
`exit_code` 字段。
Process exit code. ``-1`` conventionally indicates an internal failure (timeout, connection error, …).
—
stdoutbytes
`stdout` 字段。
Raw bytes captured from standard output.
—
stderrbytes
`stderr` 字段。
Raw bytes captured from standard error.
—

方法摘要Method Summary

方法Method说明Description
def ok() -> bool
返回ok。
Whether the command exited successfully.

属性详情Attribute Detail

exit_code

int

exit_code 字段。声明为 int。

Process exit code. -1 conventionally indicates an internal failure (timeout, connection error, …).

源码Source agentscope/tool/_builtin/_backend.py:72

stdout

bytes

stdout 字段。声明为 bytes。

Raw bytes captured from standard output.

源码Source agentscope/tool/_builtin/_backend.py:73

stderr

bytes

stderr 字段。声明为 bytes。

Raw bytes captured from standard error.

源码Source agentscope/tool/_builtin/_backend.py:74

方法详情Method Detail

ok

def ok() -> bool

返回ok。

Whether the command exited successfully.

返回Returns bool
返回布尔值,表示判断结果。`bool`:
源码Source agentscope/tool/_builtin/_backend.py:76–83
基于官方固定版本源码静态生成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.