compaction

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL