Header menu logo Nao

CompactionStrategy Type

Strategy for compacting context when it exceeds budget

Union cases

Union case Description

Composite strategies

Full Usage: Composite strategies

Parameters:

Composite: apply multiple strategies in sequence

strategies : CompactionStrategy list

DropOldest

Full Usage: DropOldest

Drop oldest messages (simple truncation)

Hierarchical(chunkSize, provider, options)

Full Usage: Hierarchical(chunkSize, provider, options)

Parameters:

Hierarchical: summarize in chunks, then summarize summaries

chunkSize : int
provider : ILlmProvider
options : CompletionOptions

RelevanceFilter(scorer, threshold)

Full Usage: RelevanceFilter(scorer, threshold)

Parameters:
    scorer : Message -> float
    threshold : float

Keep only messages matching a relevance filter

scorer : Message -> float
threshold : float

Summarize(provider, options)

Full Usage: Summarize(provider, options)

Parameters:

Summarize old messages using LLM

provider : ILlmProvider
options : CompletionOptions

Instance members

Instance member Description

this.IsComposite

Full Usage: this.IsComposite

Returns: bool
Returns: bool

this.IsDropOldest

Full Usage: this.IsDropOldest

Returns: bool
Returns: bool

this.IsHierarchical

Full Usage: this.IsHierarchical

Returns: bool
Returns: bool

this.IsRelevanceFilter

Full Usage: this.IsRelevanceFilter

Returns: bool
Returns: bool

this.IsSummarize

Full Usage: this.IsSummarize

Returns: bool
Returns: bool

Type something to start searching.