thinking • Rust AI Agent SDK
Thinking Budget Module for PraisonAI Rust SDK.
thinking
Rust AI Agent SDK
Thinking Budget Module for PraisonAI Rust SDK.
Provides configurable thinking budgets for LLM reasoning:
- Token budgets for extended thinking
- Time budgets for reasoning
- Adaptive budget allocation
- Budget tracking and reporting
Example
use praisonai::thinking::{ThinkingBudget, BudgetLevel, ThinkingTracker};
// Create a thinking budget
let budget = ThinkingBudget::high();
// Or with custom settings
let budget = ThinkingBudget::new()
.max_tokens(16000)
.adaptive(true)
.build();
// Track usage
let mut tracker = ThinkingTracker::new();
let usage = tracker.start_session(8000, None, 0.5);Import
use praisonai::thinking::*;Classes
ThinkingBudget
Budget constraints for extended thinking. Controls how much thinking/reasoning the LLM can do before producing a response.
ThinkingBudgetBuilderBuilder for ThinkingBudget.
ThinkingConfigConfiguration for thinking behavior.
ThinkingUsageUsage statistics for a single thinking session.
ThinkingTrackerTracks thinking usage across multiple sessions. Provides aggregate statistics and reporting.
BudgetLevelPredefined budget levels for thinking.