compressHistory
Compresses the current LLM prompt (message history) into a summary, replacing messages with a TLDR.
Return
The input value, unchanged.
Parameters
The input value that will be returned unchanged after compression.
Determines which messages to include in compression.
Specifies whether to retain message memory after compression.
Compresses the historical data of a tool's operations using the specified compression strategy. This method is designed for optimizing memory usage by reducing the size of stored historical data.
Return
Unit
Parameters
the strategy to use for compressing the history, defaults to the whole history compression strategy
a flag indicating whether to prioritize memory preservation during compression, defaults to true
an optional executor service to perform the operation asynchronously, defaults to null