接口 RuntimeContextAware

函数接口:
这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。

@Deprecated(forRemoval=true, since="2.0.0") @FunctionalInterface public interface RuntimeContextAware
已过时, 待删除: 此 API 元素将从以后的版本中删除。
since 2.0.0. Use MiddlewareBase instead.
Optional contract for Hook implementations that need the current per-call RuntimeContext.

During a ReActAgent.call(msgs, ctx) execution, the framework sets the context on all registered hooks that implement this interface, and clears it on completion. Hooks may cache the reference in a field, as the same RuntimeContext instance is mutably shared for cross-hook/tool coordination.

  • 方法概要

    修饰符和类型
    方法
    说明
    void
    已过时, 待删除: 此 API 元素将从以后的版本中删除。
    Injects the runtime context for the current call, or null when not executing or when clearing after a call.
  • 方法详细资料

    • setRuntimeContext

      void setRuntimeContext(RuntimeContext context)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      Injects the runtime context for the current call, or null when not executing or when clearing after a call.
      参数:
      context - current runtime context, or null