replaceHistoryWithTLDR
fun replaceHistoryWithTLDR(strategy: HistoryCompressionStrategy = HistoryCompressionStrategy.WholeHistory, preserveMemory: Boolean = true, executorService: ExecutorService? = null)(source)
Rewrites LLM message history, leaving only user message and resulting TLDR.
Default is null, which means entire history will be used.
Parameters
preserveMemory
Whether to preserve memory-related messages in the history.