Table of Contents

Method CountTokens

Namespace
Qavren.Edge.Chat
Assembly
Qavren.Edge.Chat.Onnx.dll

CountTokens(string)

Counts tokens with the model's own tokenizer, never an estimate.

int CountTokens(string text)

Parameters

text string

The text to count.

Returns

int

The token count.