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 |
|---|---|---|
model | Model | 模型实例(类型 `Model`)。the model to use (must not be null) |
existingSummary | String | existing 摘要(类型 `String`)。the prior summary, or empty string when none |
messagesToFold | List<Msg> | 消息到 Fold(类型 `List`)。the messages currently in the agent context — typically everything except the last `keepLastMessages` that the caller will retain verbatim |
Mono<String>新的摘要文本。the new summary text
源码Source
io/agentscope/spring/boot/admin/service/SummarizationStrategy.java:41