PromptTokenCounter typedef

PromptTokenCounter = int Function(String text)

Counts the tokens of text as the LLM the prompt goes to counts them, for example with its SDK's tokenizer.

Implementation

typedef PromptTokenCounter = int Function(String text);