Documentation
¶
Overview ¶
Package compaction provides types for manual context management. Users are responsible for deciding when and how to compact context; the SDK only provides CompactMessages to persist the compaction state.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// MaxTokens can be used by custom compaction logic as a threshold.
MaxTokens int64
// KeepRecentRounds can be used by custom compaction logic to define
// how many recent conversation rounds to preserve before archiving.
KeepRecentRounds int
}
Config is provided for reference by users implementing custom compaction logic. It defines the parameters a compaction strategy might use.
Click to show internal directories.
Click to hide internal directories.