类 DataBlock
java.lang.Object
io.agentscope.core.message.ContentBlock
io.agentscope.core.message.DataBlock
- 所有已实现的接口:
State
Unified data block for arbitrary binary media (image / audio / video / file).
Unlike the legacy ImageBlock, AudioBlock, VideoBlock
subclasses — which the SDK retains for back-compat — DataBlock is the
forward-looking polymorphic container for every binary modality. New code
should prefer DataBlock over the legacy subclasses; the legacy types
stay around as valid MsgRole.USER payloads to keep existing pipelines
working.
-
嵌套类概要
嵌套类 -
方法概要
-
方法详细资料
-
getSource
Gets the source of this data block.- 返回:
- The data source containing URL or Base64 data
-
getId
Gets the identifier of this data block.- 返回:
- The block id; never null
-
getName
Gets the optional name of this data block.- 返回:
- The block name, or null if not set
-
builder
Creates a new builder for constructing DataBlock instances.- 返回:
- A new builder instance
-