countTokens
Counts the number of tokens in a prompt using the model's tokenizer.
Return
The CountTokensResponse of running the model's tokenizer on the input.
Parameters
The input(s) given to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Counts the number of tokens in a text prompt using the model's tokenizer.
Return
The CountTokensResponse of running the model's tokenizer on the input.
Parameters
The text given to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Counts the number of tokens in a prompt using the model's tokenizer.
Return
The CountTokensResponse of running the model's tokenizer on the input.
Parameters
The input(s) given to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Counts the number of tokens in a text prompt using the model's tokenizer.
Return
The CountTokensResponse of running the model's tokenizer on the input.
Parameters
The text given to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Counts the number of tokens in a prompt using the model's tokenizer.
Return
The CountTokensResponse of running the model's tokenizer on the input.
Parameters
The input(s) given to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.
Counts the number of tokens in a text prompt using the model's tokenizer.
Return
The CountTokensResponse of running the model's tokenizer on the input.
Parameters
The text given to the model as a prompt.
See also
for types of errors.
Throws
if the request failed.