BudgetAllocation
Defined in the context module.Rust AI Agent SDK Budget allocation for different context components.
Fields
| Name | Type | Description |
|---|---|---|
total | usize | Total budget in tokens |
system | usize | Budget for system prompt |
history | usize | Budget for conversation history |
tools | usize | Budget for tools |
output_reserve | usize | Reserved for output |
Methods
new
| Name | Type |
|---|---|
total | usize |
with_ratios
| Name | Type |
|---|---|
total | usize |
system_pct | f64 |
history_pct | f64 |
tools_pct | f64 |
Source
View on GitHub
praisonai/src/context/mod.rs at line 146
