类 PostSummaryEvent


@Deprecated(forRemoval=true, since="2.0.0") public final class PostSummaryEvent extends SummaryEvent
已过时, 待删除: 此 API 元素将从以后的版本中删除。
since 2.0.0. Use MiddlewareBase instead.
Event fired after summary generation completes.

Modifiable: Yes - setSummaryMessage(Msg)

Context:

Note: This event is fired after the summary has been generated, allowing hooks to modify the final summary message before it's returned.

Use Cases:

  • Filter or modify the summary content
  • Add metadata to the summary message
  • Log the summary result
  • Request to stop the agent via stopAgent()
  • 构造器详细资料

    • PostSummaryEvent

      public PostSummaryEvent(Agent agent, String modelName, GenerateOptions generateOptions, Msg summaryMessage)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      Constructor for PostSummaryEvent.
      参数:
      agent - The agent instance (must not be null)
      modelName - The model name (must not be null)
      generateOptions - The generation options (may be null)
      summaryMessage - The summary result message (may be null)
  • 方法详细资料

    • getSummaryMessage

      public Msg getSummaryMessage()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      Get the summary result message.
      返回:
      The summary message, may be null
    • setSummaryMessage

      public void setSummaryMessage(Msg summaryMessage)
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      Modify the summary result message.
      参数:
      summaryMessage - The new summary message
    • stopAgent

      public void stopAgent()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      Request to stop the agent after this summary phase.

      When called, the agent will return the summary message as the final result. This is primarily for consistency with other event types; since summary is typically the last phase, this mainly serves as a signal for logging or metrics purposes.

    • isStopRequested

      public boolean isStopRequested()
      已过时, 待删除: 此 API 元素将从以后的版本中删除。
      Check if a stop has been requested.
      返回:
      true if stopAgent() has been called, false otherwise