Package com.tnsai.memory.strategy
Class TieredContextLoader.Builder
java.lang.Object
com.tnsai.memory.strategy.TieredContextLoader.Builder
- Enclosing class:
TieredContextLoader
Builder for TieredContextLoader.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the TieredContextLoader.config(TieredContextLoader.TierConfig config) Sets the tier configuration.store(MemoryStore store) Sets the memory store to load history from.summarizer(TieredContextLoader.LLMSummarizer summarizer) Sets the summarizer for Tier 2.
-
Method Details
-
store
Sets the memory store to load history from.- Parameters:
store- the memory store (required)- Returns:
- this builder
-
config
Sets the tier configuration.- Parameters:
config- tier token budgets (defaults toTieredContextLoader.TierConfig.defaults())- Returns:
- this builder
-
summarizer
Sets the summarizer for Tier 2.- Parameters:
summarizer- function to summarize older messages (required)- Returns:
- this builder
-
build
Builds the TieredContextLoader.- Returns:
- configured loader
- Throws:
NullPointerException- if store or summarizer is null
-