CountTokensInput  
    The input value for token counting. The value should be either an InvokeModel or Converse request body.
Inheritors
Types
A Converse request for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to the Converse operation.
An InvokeModel request for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to the InvokeModel operation.
Functions
Casts this CountTokensInput as a Converse and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ConverseTokensRequest value. Throws an exception if the CountTokensInput is not a Converse.
Casts this CountTokensInput as a Converse and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ConverseTokensRequest value. Returns null if the CountTokensInput is not a Converse.
Casts this CountTokensInput as a InvokeModel and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.InvokeModelTokensRequest value. Throws an exception if the CountTokensInput is not a InvokeModel.
Casts this CountTokensInput as a InvokeModel and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.InvokeModelTokensRequest value. Returns null if the CountTokensInput is not a InvokeModel.