View source: R/bedrockruntime_operations.R
| bedrockruntime_count_tokens | R Documentation |
Returns the token count for a given inference request. This operation helps you estimate token usage before sending requests to foundation models by returning the token count that would be used if the same input were sent to the model in an inference request.
See https://www.paws-r-sdk.com/docs/bedrockruntime_count_tokens/ for full documentation.
bedrockruntime_count_tokens(modelId, input)
modelId |
[required] The unique identifier or ARN of the foundation model to use for token counting. Each model processes tokens differently, so the token count is specific to the model you specify. |
input |
[required] The input for which to count tokens. The structure of this parameter depends on whether you're counting tokens for an
The input format must be compatible with the model specified in the |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.