Skip to main content

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.

estimate_tokens_heuristic

Function
This function is defined in the context module.
Estimate tokens for a string using heuristic (4 chars ≈ 1 token).

Signature

def estimate_tokens_heuristic(text: &str) -> usize

Parameters

text
&str
required
No description available.

Returns

Returns
usize
The result of the operation.

Uses

  • average

Source

View on GitHub

praisonai/src/context/mod.rs at line 319

Rust Token Management

Rust Budget