Documentation
¶
Overview ¶
Package main demonstrates custom context compaction with the PromptKit SDK.
This example shows three extensibility patterns:
- Custom CompactionRule — a rule that produces domain-specific summaries for search results instead of the generic preview+bytes format.
- Built-in CollapsePairs — collapses superseded assistant+tool pairs when the same tool is called again with the same arguments.
- Custom CompactionStrategy — a complete replacement for the default compactor, wrapping it with logging.
Run with:
go run .
Click to show internal directories.
Click to hide internal directories.