类class
agentscope.messageToolResultBlock
class ToolResultBlock(BaseModel)
源码Source
agentscope/message/_block.py:195–216工具结果块。位于 agentscope.message 包。
The tool result block. Declared in agentscope.message.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
model_config | — | 模型配置字段。 | ConfigDict(use_enum_values=True) |
type | Literal['tool_result'] | 类型字段。 | 'tool_result' |
id | str | 标识字段。 | — |
name | str | 名称字段。 | — |
output | str | List[TextBlock | DataBlock] | 输出字段。 | — |
state | ToolResultState | 状态字段。 | ToolResultState.RUNNING |
metadata | dict[str, Any] | 元数据字段。 | Field(default_factory=dict) |
created_at | str | 已创建 at字段。 | Field(default_factory=_generate_timestamp) |
finished_at | str | None | `finished_at` 字段。 | None |
属性详情Attribute Detail
model_config
= ConfigDict(use_enum_values=True)模型配置字段。
The model config field.
源码Source
agentscope/message/_block.py:198type
Literal['tool_result'] = 'tool_result'类型字段。声明为 Literal['tool_result']。
The type field.
源码Source
agentscope/message/_block.py:200id
str标识字段。声明为 str。
The id field.
源码Source
agentscope/message/_block.py:202name
str名称字段。声明为 str。
The name field.
源码Source
agentscope/message/_block.py:204output
str | List[TextBlock | DataBlock]输出字段。声明为 str | List[TextBlock | DataBlock]。
The output field.
源码Source
agentscope/message/_block.py:206state
ToolResultState = ToolResultState.RUNNING状态字段。声明为 ToolResultState。
The state field.
源码Source
agentscope/message/_block.py:209metadata
dict[str, Any] = Field(default_factory=dict)元数据字段。声明为 dict[str, Any]。
The metadata field.
源码Source
agentscope/message/_block.py:211created_at
str = Field(default_factory=_generate_timestamp)已创建 at字段。声明为 str。
The created at field.
源码Source
agentscope/message/_block.py:213finished_at
str | None = Nonefinished_at 字段。声明为 str | None。
The finished at field.
源码Source
agentscope/message/_block.py:215