类 DataBlock.Builder

java.lang.Object
io.agentscope.core.message.DataBlock.Builder
封闭类:
DataBlock

public static class DataBlock.Builder extends Object
Builder for constructing DataBlock instances.
  • 构造器详细资料

    • Builder

      public Builder()
  • 方法详细资料

    • source

      public DataBlock.Builder source(Source source)
      Sets the source for the data block.
      参数:
      source - The data source (URL or Base64)
      返回:
      This builder for chaining
    • id

      public DataBlock.Builder id(String id)
      Sets the identifier for the data block. If left unset, a fresh UUID is generated at build() time.
      参数:
      id - The stable id
      返回:
      This builder for chaining
    • name

      public DataBlock.Builder name(String name)
      Sets the optional name for the data block.
      参数:
      name - The block name (e.g. file name)
      返回:
      This builder for chaining
    • build

      public DataBlock build()
      Builds a new DataBlock with the configured fields.
      返回:
      A new DataBlock instance
      抛出:
      NullPointerException - if source is null