类class
agentscope.toolToolChunk
class ToolChunk(BaseModel)
源码Source
agentscope/tool/_response.py:28–48工具结果分块来自工具执行。位于 agentscope.tool 包。
The tool result chunk from a tool execution. Declared in agentscope.tool.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
content | List[TextBlock | DataBlock] | 内容字段。 | — |
state | ToolResultState | 状态字段。 | ToolResultState.RUNNING |
is_last | bool | 是最后字段。 | True |
metadata | dict | 元数据字段。 | Field(default_factory=dict) |
id | str | 标识字段。 | Field(default_factory=_generate_id) |
属性详情Attribute Detail
content
List[TextBlock | DataBlock]内容字段。声明为 List[TextBlock | DataBlock]。
The content field.
源码Source
agentscope/tool/_response.py:31state
ToolResultState = ToolResultState.RUNNING状态字段。声明为 ToolResultState。
The state field.
源码Source
agentscope/tool/_response.py:36is_last
bool = True是最后字段。声明为 bool。
The is last field.
源码Source
agentscope/tool/_response.py:39metadata
dict = Field(default_factory=dict)元数据字段。声明为 dict。
The metadata field.
源码Source
agentscope/tool/_response.py:42id
str = Field(default_factory=_generate_id)标识字段。声明为 str。
The id field.
源码Source
agentscope/tool/_response.py:47