类class
agentscope.eventToolResultDataDeltaEvent
class ToolResultDataDeltaEvent(EventBase)
源码Source
agentscope/event/_event.py:378–405工具结果数据增量事件,描述执行过程中的事件。位于 agentscope.event 包,继承自 EventBase。核心成员包括 validate_data_source。
Tool result data delta event. Declared in agentscope.event. Extends EventBase.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
type | Literal[EventType.TOOL_RESULT_DATA_DELTA] | 类型字段。 | EventType.TOOL_RESULT_DATA_DELTA |
reply_id | str | 回复标识字段。 | — |
tool_call_id | str | 工具调用标识字段。 | — |
block_id | str | 块标识字段。 | Field(default_factory=_generate_id) |
media_type | str | `media_type` 字段。 | — |
data | str | None | 数据字段。 | None |
url | str | None | URL字段。 | None |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
def validate_data_source() -> Selfmodel_validator | 校验数据来源。 Ensure exactly one data source is provided. |
属性详情Attribute Detail
type
Literal[EventType.TOOL_RESULT_DATA_DELTA] = EventType.TOOL_RESULT_DATA_DELTA类型字段。声明为 Literal[EventType.TOOL_RESULT_DATA_DELTA]。
The type field.
源码Source
agentscope/event/_event.py:381reply_id
str回复标识字段。声明为 str。
The reply id field.
源码Source
agentscope/event/_event.py:385tool_call_id
str工具调用标识字段。声明为 str。
The tool call id field.
源码Source
agentscope/event/_event.py:387block_id
str = Field(default_factory=_generate_id)块标识字段。声明为 str。
The block id field.
源码Source
agentscope/event/_event.py:389media_type
strmedia_type 字段。声明为 str。
The media type field.
源码Source
agentscope/event/_event.py:391data
str | None = None数据字段。声明为 str | None。
The data field.
源码Source
agentscope/event/_event.py:393url
str | None = NoneURL字段。声明为 str | None。
The url field.
源码Source
agentscope/event/_event.py:395方法详情Method Detail
validate_data_source
def validate_data_source() -> Self
model_validator
校验数据来源。
Ensure exactly one data source is provided.
Self
返回自身。Returns self.
源码Source
agentscope/event/_event.py:399–405