类 InterruptContext.Builder

java.lang.Object
io.agentscope.core.interruption.InterruptContext.Builder
封闭类:
InterruptContext

public static class InterruptContext.Builder extends Object
Builder for InterruptContext.
  • 方法详细资料

    • source

      public InterruptContext.Builder source(InterruptSource source)
      Set the source of the interruption.
      参数:
      source - The interrupt source
      返回:
      This builder
    • timestamp

      public InterruptContext.Builder timestamp(Instant timestamp)
      Set the timestamp of the interruption.
      参数:
      timestamp - The interrupt timestamp
      返回:
      This builder
    • userMessage

      public InterruptContext.Builder userMessage(Msg userMessage)
      Set the user message that triggered the interruption.
      参数:
      userMessage - The user message
      返回:
      This builder
    • pendingToolCalls

      public InterruptContext.Builder pendingToolCalls(List<ToolUseBlock> pendingToolCalls)
      Set the pending tool calls at the time of interruption.
      参数:
      pendingToolCalls - List of pending tool calls
      返回:
      This builder
    • build

      public InterruptContext build()
      Build the InterruptContext.
      返回:
      A new InterruptContext instance