llmCompressHistoryImpl

suspend fun <T> AIAgentGraphContextBase.llmCompressHistoryImpl(input: T, retrievalModel: LLModel?, strategy: HistoryCompressionStrategy, preserveMemory: Boolean): T(source)

InternalAgentsApi method. Performs LLM history compression.

Return

The input of type T, passed through without modifications.

Parameters

retrievalModel

The optional LLModel to be used temporarily for retrieval during history compression.

strategy

The HistoryCompressionStrategy to be applied to compress the conversation history.

preserveMemory

A flag indicating whether memory should be preserved, preventing permanent loss of history.

input

The input of type T that will be passed through and returned unchanged by the method.