FromTimestamp

data class FromTimestamp(val timestamp: Instant) : HistoryCompressionStrategy(source)

A strategy for compressing message histories using a specified timestamp as a reference point. This strategy removes messages that occurred before a given timestamp and creates a summarized context for further interactions.

Parameters

timestamp

The timestamp indicating the earliest point to retain messages from.

Constructors

Link copied to clipboard
constructor(timestamp: Instant)

Properties

Link copied to clipboard
val timestamp: Instant

Functions

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

Compresses the message history in the provided session according to the specified strategy.