Package com.tnsai.memory.strategy
Class ManagedConversationMemory.Builder
java.lang.Object
com.tnsai.memory.strategy.ManagedConversationMemory.Builder
- Enclosing class:
ManagedConversationMemory
Builder for ManagedConversationMemory.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautoOptimize(boolean auto) Whether to automatically optimize when threshold is reached.build()optimizeThreshold(int percentage) Percentage of budget at which to trigger optimization.strategy(MemoryStrategy strategy) Sets the memory strategy.tokenBudget(TokenBudget budget) Sets the token budget.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
strategy
Sets the memory strategy. Default: SlidingWindowStrategy -
tokenBudget
Sets the token budget. Default: 8192 context window -
autoOptimize
Whether to automatically optimize when threshold is reached. Default: true -
optimizeThreshold
Percentage of budget at which to trigger optimization. Default: 80 -
build
-