AS AgentScopeAPI 手册 / API Reference

NoOpToolEmitter

public class NoOpToolEmitter implements ToolEmitter
源码Source io/agentscope/core/tool/NoOpToolEmitter.java:26–45

无 Op 工具 Emitter,让智能体以受控方式调用外部能力。位于 io.agentscope.core.tool 包,实现 ToolEmitter。核心成员包括 emit、INSTANCE。

A no-op implementation of ToolEmitter that silently discards all emitted chunks.

This is used as a default when no chunk callback is configured, allowing tools to call emit() without null checks.

字段摘要Field Summary

字段Field类型Type说明Description
INSTANCE
staticfinal
NoOpToolEmitter
实例字段。
Singleton instance.

方法摘要Method Summary

方法Method说明Description
public void emit(ToolResultBlock chunk)
设置发出。
Silently discards the emitted chunk without performing any action.

字段详情Field Detail

INSTANCE

public static final NoOpToolEmitter INSTANCE
staticfinal

实例字段。声明为 public static final NoOpToolEmitter INSTANCE。

Singleton instance.

源码Source io/agentscope/core/tool/NoOpToolEmitter.java:29

方法详情Method Detail

emit

public void emit(ToolResultBlock chunk)

设置发出。

Silently discards the emitted chunk without performing any action.

参数Parameters
名称Name类型Type说明Description
chunkToolResultBlock分块(类型 `ToolResultBlock`)。The tool result chunk to discard (ignored)
源码Source io/agentscope/core/tool/NoOpToolEmitter.java:41–44
基于官方固定版本源码静态生成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.