`Class CallbackContext`

Direct Known Subclasses:
ToolContext

public class CallbackContext extends Context
代理调用过程中各种回调函数的上下文信息。

扩展;延长 Context 为了保持向后兼容性,代理(agent)和模型(model)的回调函数签名仍然使用这种类型。

  • 构造函数详细信息

    • CallbackContext

      public CallbackContext(InvocationContext invocationContext, @Nullable EventActions eventActions)
      初始化回调函数的上下文(即调用该回调函数时的环境或数据)。
      Parameters:
      invocationContext - Current invocation context.
      eventActions - Callback event actions, or null for new empty ones.
    • CallbackContext

      public CallbackContext(InvocationContext invocationContext, @Nullable EventActions eventActions, @Nullable String eventId)
      初始化回调函数的上下文(即调用该回调函数时的环境或数据)。
      Parameters:
      invocationContext - Current invocation context.
      eventActions - Callback event actions, or null for new empty ones.
      eventId - The ID of the event associated with this context, or null if there is none.