Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
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
fn new(total: usize) -> Self
Create a new budget allocation
Parameters:
with_ratios
fn with_ratios(total: usize, system_pct: f64, history_pct: f64, tools_pct: f64) -> Self
Create with custom ratios
Parameters:
| 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