AS AgentScopeAPI 手册 / API Reference

ReasoningEvent

@Deprecated(forRemoval = true, since = "2.0.0") public abstract sealed class ReasoningEvent extends HookEvent permits PreReasoningEvent, PostReasoningEvent, ReasoningChunkEvent
源码Source io/agentscope/core/hook/ReasoningEvent.java:43–84

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

Base class for reasoning-related events.

This sealed class provides common context for all reasoning events:

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

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

Subclasses represent different stages of the reasoning process:

  • PreReasoningEvent - Before LLM call

  • PostReasoningEvent - After LLM call

  • ReasoningChunkEvent - During streaming

构造器摘要Constructor Summary

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

方法摘要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

ReasoningEvent

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

初始化 ReasoningEvent 实例。

Constructor for ReasoningEvent.

参数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/ReasoningEvent.java:59–64

方法详情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/ReasoningEvent.java:71–73

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/ReasoningEvent.java:81–83

继承成员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.