A context compactor that uses token count to determine when to compact events. Oldest events are summarized into a CompactedEvent when the session history exceeds the token threshold.
Compacts the context in place.
The current invocation context.
Determines whether the context should be compacted.
A boolean or a promise resolving to a boolean indicating if compaction should occur.
A context compactor that uses token count to determine when to compact events. Oldest events are summarized into a CompactedEvent when the session history exceeds the token threshold.