AS AgentScopeAPI 手册 / API Reference

SummaryEvent

@Deprecated(forRemoval = true, since = "2.0.0") public abstract sealed class SummaryEvent extends HookEvent permits PreSummaryEvent, SummaryChunkEvent, PostSummaryEvent
源码Source io/agentscope/core/hook/SummaryEvent.java:44–85

摘要事件,描述执行过程中的事件。位于 io.agentscope.core.hook 包,继承自 HookEvent。核心成员包括 getModelName、getGenerateOptions、SummaryEvent。

Base class for summary-related events.

This sealed class provides common context for all summary events that occur when a ReActAgent reaches its maximum iterations and generates a summary:

  • #getModelName() - The model name (e.g., "qwen-plus", "gpt-4")

  • #getGenerateOptions() - The generation options (temperature, etc.)

Subclasses represent different stages of the summary process:

  • PreSummaryEvent - Before summary generation

  • SummaryChunkEvent - During streaming

  • PostSummaryEvent - After summary generation completes

构造器摘要Constructor Summary

构造器Constructor说明Description
protected SummaryEvent(HookEventType type, Agent agent, String modelName, GenerateOptions generateOptions)
初始化 `SummaryEvent` 实例。
Constructor for SummaryEvent.

方法摘要Method Summary

方法Method说明Description
public final String getModelName()
final
获取模型名称。
Get the model name.
public final GenerateOptions getGenerateOptions()
final
获取 `getGenerateOptions`。
Get the generation options.

构造器详情Constructor Detail

SummaryEvent

protected SummaryEvent(HookEventType type, Agent agent, String modelName, GenerateOptions generateOptions)

初始化 SummaryEvent 实例。

Constructor for SummaryEvent.

参数Parameters
名称Name类型Type说明Description
typeHookEventType类型(类型 `HookEventType`)。The event type (must not be null)
agentAgent智能体(类型 `Agent`)。The agent instance (must not be null)
modelNameString模型名称(类型 `String`)。The model name (must not be null)
generateOptionsGenerateOptionsgenerate 选项(类型 `GenerateOptions`)。The generation options (may be null if using model defaults)
抛出Throws
  • NullPointerException 可能抛出 `NullPointerException`。if type, agent, or modelName is null
源码Source io/agentscope/core/hook/SummaryEvent.java:60–65

方法详情Method Detail

getModelName

public final String getModelName()
final

获取模型名称。

Get the model name.

返回Returns String
返回字符串结果。The model name (e.g., "qwen-plus", "gpt-4")
源码Source io/agentscope/core/hook/SummaryEvent.java:72–74

getGenerateOptions

public final GenerateOptions getGenerateOptions()
final

获取 getGenerateOptions。

Get the generation options.

返回Returns GenerateOptions
返回GenerateOptions。The generation options (temperature, maxTokens, etc.), or null if using model defaults
源码Source io/agentscope/core/hook/SummaryEvent.java:82–84

继承成员Inherited Members

基于官方固定版本源码静态生成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.