类 DataBlock.Builder
java.lang.Object
io.agentscope.core.message.DataBlock.Builder
- 封闭类:
DataBlock
Builder for constructing DataBlock instances.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明build()Builds a new DataBlock with the configured fields.Sets the identifier for the data block.Sets the optional name for the data block.Sets the source for the data block.
-
构造器详细资料
-
Builder
public Builder()
-
-
方法详细资料
-
source
Sets the source for the data block.- 参数:
source- The data source (URL or Base64)- 返回:
- This builder for chaining
-
id
Sets the identifier for the data block. If left unset, a fresh UUID is generated atbuild()time.- 参数:
id- The stable id- 返回:
- This builder for chaining
-
name
Sets the optional name for the data block.- 参数:
name- The block name (e.g. file name)- 返回:
- This builder for chaining
-
build
Builds a new DataBlock with the configured fields.- 返回:
- A new DataBlock instance
- 抛出:
NullPointerException- if source is null
-