Package com.axelor.ai.chat.plugin
Interface ConversationSummarizer
- All Known Implementing Classes:
PromptedConversationSummarizer
public interface ConversationSummarizer
Condenses the stretch of conversation that is rolling out of the context window.
This is the one part of trimming that a provider can do better than we can: OpenAI's
/responses/compact and Anthropic's compaction both exist to produce exactly this text.
Everything around it — which messages roll out, what is kept verbatim, when a summary is reused —
is our policy and stays with the caller.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHow much of the input budget the caller holds back for the summary an implementation returns. -
Method Summary
-
Field Details
-
SUMMARY_MAX_TOKENS
static final int SUMMARY_MAX_TOKENSHow much of the input budget the caller holds back for the summary an implementation returns.- See Also:
-
-
Method Details
-
summarize
- Parameters:
messages- the stretch leaving the window, oldest firstmodel- the conversation's model, for a summarizer that has no model of its own- Returns:
- the summary, or null when one could not be produced — the caller then trims without it
-