🔄 Big News! bazed.ai is now sagentic.ai. Same vision, new name!

Skip to content

@sagentic-ai/sagentic-af / countTokens

countTokens() ​

ts
countTokens(text): number

Counts the number of tokens in a string

Parameters ​

• text: string

the string to count the tokens of

Returns ​

number

Source ​

src/common.ts:154