事件压实(Compaction)
data class EventCompaction(val startTimestamp: Long, val endTimestamp: Long, val compactedContent: Content)
A record that a continuous range of session Events has been replaced by a single piece of compactedContent (typically a model-generated summary).
An EventCompaction is attached to a new Event via EventActions.compaction; the original events are left untouched. When the next LLM prompt is built, the contents processor uses the range to skip the covered events and inserts compactedContent in their place.
属性(Properties)
Link copied to clipboard
用于替换提示中提到的相关事件的内容。
Link copied to clipboard
最近被覆盖的事件的起始时间(以毫秒为单位,包含该时间点本身)。该时间必须大于或等于…… startTimestamp此外,该功能还可以读取 ADK Python 中表示的“分数纪元秒”(即以小数形式表示的秒数)。
Link copied to clipboard
最早被覆盖的事件的起始时间(以毫秒为单位,包含该时间点本身)。同时也可以读取 ADK Python 提供的、表示事件发生时间的“小数秒”格式的数据。