countTokens method

int countTokens(
  1. String text, {
  2. String? model,
})

Counts the tokens in text using the configured encoder.

Implementation

int countTokens(String text, {String? model}) => _encoder.count(text);