Options related to tokenization for a tool invocation.
Fields
countTokens(text:String, ?token:CancellationToken):Thenable<Int>
Count the number of tokens in a message using the model specific tokenizer-logic. @link CancellationTokenSource} for how to create one.
Parameters:
text | A string. |
---|---|
token | Optional cancellation token. See { |
Returns:
A thenable that resolves to the number of tokens.