AS AgentScopeAPI 手册 / API Reference

SummarizationStrategy

public interface SummarizationStrategy
源码Source io/agentscope/spring/boot/admin/service/SummarizationStrategy.java:30–42

定义 Summarization Strategy契约的接口。位于 io.agentscope.spring.boot.admin.service 包。核心成员包括 summarize。

Strategy for the session:compact action.

Receives the current conversation buffer + any prior rolling summary, and returns the new summary text. The caller is responsible for clearing / truncating AgentState.context and persisting the result — this interface only owns the "what should the new summary say" decision.

方法摘要Method Summary

方法Method说明Description
public Mono<String> summarize(Model model, String existingSummary, List<Msg> messagesToFold)
执行总结相关操作。
Produce a new rolling summary.

方法详情Method Detail

summarize

public Mono<String> summarize(Model model, String existingSummary, List<Msg> messagesToFold)

执行总结相关操作。

Produce a new rolling summary.

参数Parameters
名称Name类型Type说明Description
modelModel模型实例(类型 `Model`)。the model to use (must not be null)
existingSummaryStringexisting 摘要(类型 `String`)。the prior summary, or empty string when none
messagesToFoldList<Msg>消息到 Fold(类型 `List`)。the messages currently in the agent context — typically everything except the last `keepLastMessages` that the caller will retain verbatim
返回Returns Mono<String>
新的摘要文本。the new summary text
源码Source io/agentscope/spring/boot/admin/service/SummarizationStrategy.java:41
基于官方固定版本源码静态生成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.