Skip to main content

tokens_for

Function tokens_for 

Source
pub fn tokens_for(bytes: u64) -> u64
Expand description

Estimated tokens for a file of this many bytes: never fewer than one, so that an entry always costs something.

use majordomus_cli::devcontext::tokens_for;
assert_eq!(tokens_for(0), 1);
assert_eq!(tokens_for(4), 1);
assert_eq!(tokens_for(4001), 1001);