CountTokensInput
module-attribute
¶
CountTokensInput = Union[CountTokensInputInvokeModel | CountTokensInputConverse | CountTokensInputUnknown]
The input value for token counting. The value should be either an
InvokeModel or Converse request body.
Union Members¶
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.
Source code in src/aws_sdk_bedrock_runtime/models.py
14149 14150 14151 14152 14153 14154 14155 14156 14157 14158 14159 14160 14161 14162 14163 14164 14165 14166 14167 14168 | |
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.
Source code in src/aws_sdk_bedrock_runtime/models.py
14171 14172 14173 14174 14175 14176 14177 14178 14179 14180 14181 14182 14183 14184 14185 14186 14187 14188 14189 14190 | |
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.
Source code in src/aws_sdk_bedrock_runtime/models.py
14193 14194 14195 14196 14197 14198 14199 14200 14201 14202 14203 14204 14205 14206 14207 14208 14209 14210 14211 14212 14213 | |