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

DataBlockDeltaEvent

class DataBlockDeltaEvent(EventBase)
源码Source agentscope/event/_event.py:212–235

数据块增量事件,描述执行过程中的事件。位于 agentscope.event 包,继承自 EventBase。核心成员包括 validate_data_source。

Data block delta event. Declared in agentscope.event. Extends EventBase.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
typeLiteral[EventType.DATA_BLOCK_DELTA]
类型字段。
EventType.DATA_BLOCK_DELTA
reply_idstr
回复标识字段。
—
block_idstr
块标识字段。
—
media_typestr
`media_type` 字段。
—
datastr | None
数据字段。
None
urlstr | 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.DATA_BLOCK_DELTA] = EventType.DATA_BLOCK_DELTA

类型字段。声明为 Literal[EventType.DATA_BLOCK_DELTA]。

The type field.

源码Source agentscope/event/_event.py:215

reply_id

str

回复标识字段。声明为 str。

The reply id field.

源码Source agentscope/event/_event.py:217

block_id

str

块标识字段。声明为 str。

The block id field.

源码Source agentscope/event/_event.py:219

media_type

str

media_type 字段。声明为 str。

The media type field.

源码Source agentscope/event/_event.py:221

data

str | None = None

数据字段。声明为 str | None。

The data field.

源码Source agentscope/event/_event.py:223

url

str | None = None

URL字段。声明为 str | None。

The url field.

源码Source agentscope/event/_event.py:225

方法详情Method Detail

validate_data_source

def validate_data_source() -> Self
model_validator

校验数据来源。

Ensure exactly one data source is provided.

返回Returns Self
返回自身。Returns self.
源码Source agentscope/event/_event.py:229–235

继承成员Inherited Members

继承自Inherited from EventBase
基于官方固定版本源码静态生成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.