CountTokensInput
The input value for token counting. The value should be either an InvokeModel or Converse request body.
Contents
Important
This data type is a UNION, so only one of the following members can be specified when used or returned.
- converse
-
A
Converserequest for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to theConverseoperation.Type: ConverseTokensRequest object
Required: No
- invokeModel
-
An
InvokeModelrequest for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to theInvokeModeloperation.Type: InvokeModelTokensRequest object
Required: No
See Also
For more information about using this API in one of the language-specific AWS SDKs, see the following: