Function compress_to_budget
Source pub fn compress_to_budget(text: &str, max_tokens: usize) -> String
Expand description
Compress text to fit within a token budget by pruning low-importance
branches from the semantic tree.
§Arguments
text — the document text to compress
max_tokens — the maximum number of tokens in the output
§Returns
Compressed text that fits within the token budget.