AS AgentScopeAPI 手册 / API Reference

StreamingHook

@Deprecated(forRemoval = true, since = "2.0.0") @SuppressWarnings("deprecation") public class StreamingHook implements Hook
源码Source io/agentscope/core/agent/StreamingHook.java:47–169

流式钩子,驱动智能体的推理、工具调用与会话执行。位于 io.agentscope.core.agent 包,实现 Hook。核心成员包括 onEvent、StreamingHook。

Internal hook implementation for streaming events.

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

构造器摘要Constructor Summary

构造器Constructor说明Description
public StreamingHook(FluxSink<Event> sink, StreamOptions options)
创建新的流式钩子。
Creates a new streaming hook.

方法摘要Method Summary

方法Method说明Description
public T extends HookEvent Mono<T> onEvent(T event)
处理事件事件。
Performs the on event operation.

构造器详情Constructor Detail

StreamingHook

public StreamingHook(FluxSink<Event> sink, StreamOptions options)

创建新的流式钩子。

Creates a new streaming hook.

参数Parameters
名称Name类型Type说明Description
sinkFluxSink<Event>FluxSink 到发出事件到。The FluxSink to emit events to
optionsStreamOptions用于流式的配置选项。Configuration options for streaming
源码Source io/agentscope/core/agent/StreamingHook.java:63–66

方法详情Method Detail

onEvent

public T extends HookEvent Mono<T> onEvent(T event)

处理事件事件。

Performs the on event operation.

参数Parameters
名称Name类型Type说明Description
eventT事件(类型 `T`)。The event.
返回Returns Mono<T>
返回Mono。Returns mono.
源码Source io/agentscope/core/agent/StreamingHook.java:68–127

继承成员Inherited Members

继承自Methods inherited from Hook
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.