Documentation
¶
Overview ¶
Package contextbudget trims oversized input before it reaches the local model, keeping requests inside the model's context window.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Trim ¶
Trim caps input to maxChars. When it must cut, it keeps the head and tail (where summaries/structure usually live) and inserts an elision marker. Both cut points back off to a rune boundary (LO-13: byte-offset cuts split multibyte runes — Spanish á/ñ at a boundary produced mojibake mid-prompt). Returns the possibly-trimmed text and whether trimming occurred.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.