struct

Smith::Config::ContextSettings

Inherits Struct < Value < Object

Constructors

new(max_tokens : Int32 = DEFAULT_MAX_CONTEXT_TOKENS, compact_at : Float64 = Context::DEFAULT_COMPACT_AT, compact_to : Float64 = Context::DEFAULT_COMPACT_TO)
Source

Instance methods

budget(overhead_tokens : Int32 = 0, ratio : Float64 = 1.0) : Context::Budget
Source
compact_at

Fractions of max_tokens: compaction acts at compact_at and compacts down to compact_to. Fractions rather than token counts so raising max_tokens for a wider-window model scales both.

Source
compact_to
Source
max_tokens
Source
valid_thresholds?

A target above the trigger, or either above the budget, is not a preference — it is a typo that would make compaction nonsense.

Source