TypedCompressHistoryNodeBuilder
class TypedCompressHistoryNodeBuilder<Input : Any>(name: String, inputTypeToken: ERROR CLASS: Symbol not found for TypeToken, retrievalModel: ERROR CLASS: Symbol not found for LLModel?? = null, strategy: HistoryCompressionStrategy = HistoryCompressionStrategy.WholeHistory, preserveMemory: Boolean = true)(source)
A builder class for configuring and creating a typed compression history node within an AI agent graph.
Type Parameters
Input
The type of the input data for the node.
Constructors
Link copied to clipboard
constructor(name: String, inputTypeToken: ERROR CLASS: Symbol not found for TypeToken, retrievalModel: ERROR CLASS: Symbol not found for LLModel?? = null, strategy: HistoryCompressionStrategy = HistoryCompressionStrategy.WholeHistory, preserveMemory: Boolean = true)
Functions
Link copied to clipboard
Builds and returns an instance of AIAgentNodeBase configured for compressing history in the AI agent strategy graph. The resulting node is bound to the current configuration parameters, including the retrieval model, compression strategy, and memory preservation settings.
Link copied to clipboard
fun compressionStrategy(strategy: HistoryCompressionStrategy): TypedCompressHistoryNodeBuilder<Input>
Sets the history compression strategy to be used for this builder.
Link copied to clipboard
Sets whether memory preservation is enabled for the node being built.
Link copied to clipboard
fun withRetrievalModel(model: ERROR CLASS: Symbol not found for LLModel): TypedCompressHistoryNodeBuilder<Input>
Configures the node builder with a specific retrieval model.