类 StreamingHook

java.lang.Object
io.agentscope.core.agent.StreamingHook
所有已实现的接口:
Hook

@Deprecated(forRemoval=true, since="2.0.0") public class StreamingHook extends Object implements Hook
已过时, 待删除: 此 API 元素将从以后的版本中删除。
since 2.0.0. Replaced by the MiddlewareBase system. Use ReActAgent.streamEvents(java.util.List) for fine-grained event streaming.
Internal hook implementation for streaming events.

Intercepts hook callbacks and emits Event instances to a FluxSink. Handles event filtering and chunk mode processing.

  • 构造器详细资料

    • StreamingHook

      public StreamingHook(reactor.core.publisher.FluxSink<Event> sink, StreamOptions options)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      Creates a new streaming hook.
      参数:
      sink - The FluxSink to emit events to
      options - Configuration options for streaming
  • 方法详细资料

    • onEvent

      public <T extends HookEvent> reactor.core.publisher.Mono<T> onEvent(T event)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      从接口复制的说明: Hook
      Handle a hook event.

      This method is called for all agent execution events. Use pattern matching to handle specific event types.

      Modifiable Events: For events with setters, you can modify the context and the changes will affect agent execution:

      Notification Events: Events without setters are read-only:

      指定者:
      onEvent 在接口中 Hook
      类型参数:
      T - The concrete event type
      参数:
      event - The hook event
      返回:
      Mono containing the potentially modified event