类class
agentscope.toolExecResult
@dataclass
class ExecResult
源码Source
agentscope/tool/_builtin/_backend.py:62–83Exec 结果,让智能体以受控方式调用外部能力。位于 agentscope.tool 包。核心成员包括 ok。
Result of running a shell command via a backend. Declared in agentscope.tool.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
exit_code | int | `exit_code` 字段。 Process exit code. ``-1`` conventionally indicates
an internal failure (timeout, connection error, …). | — |
stdout | bytes | `stdout` 字段。 Raw bytes captured from standard output. | — |
stderr | bytes | `stderr` 字段。 Raw bytes captured from standard error. | — |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
def ok() -> bool | 返回ok。 Whether the command exited successfully. |
属性详情Attribute Detail
exit_code
intexit_code 字段。声明为 int。
Process exit code. -1 conventionally indicates
an internal failure (timeout, connection error, …).
源码Source
agentscope/tool/_builtin/_backend.py:72stdout
bytesstdout 字段。声明为 bytes。
Raw bytes captured from standard output.
源码Source
agentscope/tool/_builtin/_backend.py:73stderr
bytesstderr 字段。声明为 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.
bool
返回布尔值,表示判断结果。`bool`:
源码Source
agentscope/tool/_builtin/_backend.py:76–83