Skip to content

Bedrock Runtime  >  Unions  >  CountTokensInput

CountTokensInput

Union Type

CountTokensInput module-attribute

The input value for token counting. The value should be either an InvokeModel or Converse request body.

Union Member Types

CountTokensInputInvokeModel dataclass

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.

Attributes

value instance-attribute

CountTokensInputConverse dataclass

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.

Attributes

value instance-attribute

CountTokensInputUnknown dataclass

Represents an unknown variant.

If you receive this value, you will need to update your library to receive the parsed value.

This value may not be deliberately sent.

Attributes

tag instance-attribute
tag: str