类 InterruptContext.Builder
java.lang.Object
io.agentscope.core.interruption.InterruptContext.Builder
- 封闭类:
InterruptContext
Builder for InterruptContext.
-
方法概要
修饰符和类型方法说明build()Build the InterruptContext.pendingToolCalls(List<ToolUseBlock> pendingToolCalls) Set the pending tool calls at the time of interruption.source(InterruptSource source) Set the source of the interruption.Set the timestamp of the interruption.userMessage(Msg userMessage) Set the user message that triggered the interruption.
-
方法详细资料
-
source
Set the source of the interruption.- 参数:
source- The interrupt source- 返回:
- This builder
-
timestamp
Set the timestamp of the interruption.- 参数:
timestamp- The interrupt timestamp- 返回:
- This builder
-
userMessage
Set the user message that triggered the interruption.- 参数:
userMessage- The user message- 返回:
- This builder
-
pendingToolCalls
Set the pending tool calls at the time of interruption.- 参数:
pendingToolCalls- List of pending tool calls- 返回:
- This builder
-
build
Build the InterruptContext.- 返回:
- A new InterruptContext instance
-