Class WindowCompactionStrategy.Builder
java.lang.Object
org.springframework.ai.session.compaction.WindowCompactionStrategy.Builder
- Enclosing class:
- WindowCompactionStrategy
-
Method Summary
Modifier and TypeMethodDescriptionbuild()lastEvents(int n) Keeps the lastnconversation events; seeCompactionWindow.lastEvents(int).lastTurns(int n) Keeps the lastnturns; seeCompactionWindow.lastTurns(int).summarizer(CompactionSummarizer summarizer) The summarizer that condenses the covered turns into a summary turn; none by default, so the covered turns leave the view without a stand-in.tokenBudget(int maxTokens) Keeps what fits inmaxTokens; seeCompactionWindow.tokenBudget(int).tokenCountEstimator(TokenCountEstimator tokenCountEstimator) The estimator of a token budget and of the tokens a pass saves, applied toEventText; aJTokkitTokenCountEstimatorby default.window(CompactionWindow window) The rule to cut by;WindowCompactionStrategy.DEFAULT_WINDOWby default.
-
Method Details
-
window
The rule to cut by;WindowCompactionStrategy.DEFAULT_WINDOWby default. -
lastEvents
Keeps the lastnconversation events; seeCompactionWindow.lastEvents(int). -
lastTurns
Keeps the lastnturns; seeCompactionWindow.lastTurns(int). -
tokenBudget
Keeps what fits inmaxTokens; seeCompactionWindow.tokenBudget(int). -
tokenCountEstimator
public WindowCompactionStrategy.Builder tokenCountEstimator(TokenCountEstimator tokenCountEstimator) The estimator of a token budget and of the tokens a pass saves, applied toEventText; aJTokkitTokenCountEstimatorby default. -
summarizer
The summarizer that condenses the covered turns into a summary turn; none by default, so the covered turns leave the view without a stand-in. -
build
-