ModelSummarizationStrategy
public final class ModelSummarizationStrategy implements SummarizationStrategy
源码Source
io/agentscope/spring/boot/admin/service/ModelSummarizationStrategy.java:37–114模型 Summarization Strategy,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.admin.service 包,实现 SummarizationStrategy。核心成员包括 summarize。
Default SummarizationStrategy that asks the agent's own model to produce a fresh
rolling summary.
The strategy is intentionally conservative: it never includes the previous summary in the prompt verbatim (to avoid prompt explosion), only the existing summary plus the messages being folded. The model is instructed to keep names, dates, and any user-stated facts.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Mono<String> summarize(Model model, String existingSummary, List<Msg> messagesToFold) | 执行总结相关操作。 Performs the summarize operation. |
方法详情Method Detail
summarize
public Mono<String> summarize(Model model, String existingSummary, List<Msg> messagesToFold)
执行总结相关操作。
Performs the summarize operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
model | Model | 模型实例(类型 `Model`)。The model. |
existingSummary | String | existing 摘要(类型 `String`)。The existing summary. |
messagesToFold | List<Msg> | 消息到 Fold(类型 `List`)。The messages to fold. |
Mono<String>返回Mono。Returns mono.
源码Source
io/agentscope/spring/boot/admin/service/ModelSummarizationStrategy.java:47–89