类 StreamOptions.Builder

java.lang.Object
io.agentscope.core.agent.StreamOptions.Builder
封闭类:
StreamOptions

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

    • Builder

      public Builder()
  • 方法详细资料

    • eventTypes

      public StreamOptions.Builder eventTypes(EventType... types)
      Set which event types to stream.

      Only events matching these types will be emitted in the Flux. Use EventType.ALL to receive all types.

      参数:
      types - One or more event types
      返回:
      this builder
    • incremental

      public StreamOptions.Builder incremental(boolean incremental)
      Set whether to use incremental mode for streaming content.

      Controls how streaming content is delivered:

      • true (incremental): Only new content in each emission
      • false (cumulative): All accumulated content in each emission
      参数:
      incremental - true for incremental mode, false for cumulative mode
      返回:
      this builder
    • includeReasoningChunk

      public StreamOptions.Builder includeReasoningChunk(boolean includeReasoningChunk)
      Include or exclude incremental reasoning chunk emissions.

      When EventType.REASONING is enabled, some providers emit reasoning deltas (chunks) as the model thinks. Set to false to hide these.

      参数:
      includeReasoningChunk - true to include chunk emissions, false to filter them out
      返回:
      this builder
    • includeReasoningResult

      public StreamOptions.Builder includeReasoningResult(boolean includeReasoningResult)
      Include or exclude the final consolidated reasoning result emission.

      When EventType.REASONING is enabled, some providers emit a final reasoning result. Set to false to hide it.

      参数:
      includeReasoningResult - true to include the final reasoning result, false to filter it out
      返回:
      this builder
    • includeActingChunk

      public StreamOptions.Builder includeActingChunk(boolean includeActingChunk)
      Include or exclude tool execution chunk emissions.

      When EventType.TOOL_RESULT is enabled, tools may emit intermediate chunks via ToolEmitter. Set to false to hide these and only receive the final tool result.

      参数:
      includeActingChunk - true to include chunk emissions, false to filter them out
      返回:
      this builder
    • includeSummaryChunk

      public StreamOptions.Builder includeSummaryChunk(boolean includeSummaryChunk)
      Include or exclude summary chunk emissions.

      When EventType.SUMMARY is enabled, summary generation may emit intermediate chunks. Set to false to hide these and only receive the final summary result.

      参数:
      includeSummaryChunk - true to include chunk emissions, false to filter them out
      返回:
      this builder
    • includeSummaryResult

      public StreamOptions.Builder includeSummaryResult(boolean includeSummaryResult)
      Include or exclude the final consolidated summary result emission.

      When EventType.SUMMARY is enabled, the final summary result is emitted after generation completes. Set to false to hide it.

      参数:
      includeSummaryResult - true to include the final summary result, false to filter it out
      返回:
      this builder
    • build

      public StreamOptions build()