Skip to main content

ThinkingBudget

Defined in the thinking module.
Rust AI Agent SDK Budget constraints for extended thinking. Controls how much thinking/reasoning the LLM can do before producing a response.

Fields

Methods

new

Create a new ThinkingBudget with default values.

from_level

Create a budget from a predefined level. Parameters:

minimal

Create a minimal budget.

low

Create a low budget.

medium

Create a medium budget.

high

Create a high budget.

maximum

Create a maximum budget.

get_tokens_for_complexity

Get token budget based on task complexity. # Arguments * complexity - Complexity score (0.0 to 1.0) # Returns Adjusted token budget Parameters:

to_map

Convert to HashMap for serialization.

Source

View on GitHub

praisonai/src/thinking/mod.rs at line 80

Rust Thinking

Rust Reasoning

Rust Budget

Rust Token Management