OptionalinstructionsWhat the summary keeps and drops, and whose memory it is.
By default, COMPACT_MESSAGES_INSTRUCTIONS. To extend it rather than replace it, append your own sentences to that constant.
How many of the latest turns to keep word for word.
OptionalmaxThe summary's maximum length, in words. Default: 150.
The conversation since the last compaction, oldest first.
The language model that writes the summary, ideally a fast, low-cost one.
OptionalsummaryThe summary the previous compaction returned, which the new one carries on.
Options passed to compactMessages.