CompactionStrategy Type
Strategy for compacting context when it exceeds budget
Union cases
| Union case |
Description
|
|
Composite: apply multiple strategies in sequence
|
Full Usage:
DropOldest
|
Drop oldest messages (simple truncation) |
Full Usage:
Hierarchical(chunkSize, provider, options)
Parameters:
int
provider : ILlmProvider
options : CompletionOptions
|
Hierarchical: summarize in chunks, then summarize summaries
|
Full Usage:
RelevanceFilter(scorer, threshold)
Parameters:
Message -> float
threshold : float
|
Keep only messages matching a relevance filter
|
Full Usage:
Summarize(provider, options)
Parameters:
ILlmProvider
options : CompletionOptions
|
Summarize old messages using LLM
|
Instance members
| Instance member |
Description
|
Full Usage:
this.IsComposite
Returns: bool
|
|
Full Usage:
this.IsDropOldest
Returns: bool
|
|
Full Usage:
this.IsHierarchical
Returns: bool
|
|
Full Usage:
this.IsRelevanceFilter
Returns: bool
|
|
Full Usage:
this.IsSummarize
Returns: bool
|
|
Nao