WholeHistory

WholeHistory is a concrete implementation of the HistoryCompressionStrategy that encapsulates the logic for compressing entire conversation history into a succinct summary (TL;DR) and composing necessary messages to create a streamlined prompt suitable for language model interactions.

Functions

Link copied to clipboard
open suspend override fun compress(llmSession: AIAgentLLMWriteSession, preserveMemory: Boolean, memoryMessages: List<Message>)

Compresses and adjusts the prompt for the local agent's write session by summarizing and incorporating memory messages optionally.