Skip to content

estimateTokenCount

function estimateTokenCount(text): number;

Token estimation function. Uses a rough 4:1 character-to-token ratio. Consistent with ContextManager.ts.

Parameter Type

text

string

number