Uses of Interface
org.springframework.ai.session.compaction.CompactionTrigger
Packages that use CompactionTrigger
Package
Description
-
Uses of CompactionTrigger in org.springframework.ai.session
Methods in org.springframework.ai.session with parameters of type CompactionTriggerModifier and TypeMethodDescriptionDefaultSessionService.compact(String sessionId, CompactionTrigger trigger, CompactionStrategy strategy) SessionService.compact(String sessionId, CompactionTrigger trigger, CompactionStrategy strategy) Evaluates the trigger on the active view and, when it fires, runs the strategy and records its result: oneEventType.COMPACTIONboundary event followed by the summary events, in one version-checked append. -
Uses of CompactionTrigger in org.springframework.ai.session.advisor
Methods in org.springframework.ai.session.advisor with parameters of type CompactionTriggerModifier and TypeMethodDescriptionSessionAdvisors.Builder.compaction(CompactionTrigger trigger, CompactionStrategy strategy) Compacts the session once a turn has ended, when the trigger fires.SessionTurnAdvisor.Builder.compactionTrigger(CompactionTrigger trigger) When to compact once a turn has ended; set together withSessionTurnAdvisor.Builder.compactionStrategy. -
Uses of CompactionTrigger in org.springframework.ai.session.compaction
Classes in org.springframework.ai.session.compaction that implement CompactionTriggerModifier and TypeClassDescriptionfinal classFires when any of its triggers fires.final classFires when the estimated tokens of the view reach a threshold: the latest stored system message, the summaries and the conversation, measured onEventTextwith aTokenCountEstimator, JTokkit by default.final classFires when the view holds more than a number of turns: a user message and everything up to the next one.Methods in org.springframework.ai.session.compaction with parameters of type CompactionTriggerModifier and TypeMethodDescriptionstatic CompositeCompactionTriggerCompositeCompactionTrigger.anyOf(CompactionTrigger... triggers) A trigger that fires when any of the given triggers fires.