Skip to main content

estimate_tokens_heuristic

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

Signature

Parameters

&str
required
No description available.

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