Skip to content

Bedrock Runtime  >  Structures  >  ConverseTokensRequest

ConverseTokensRequest

Structure Class

ConverseTokensRequest dataclass

The inputs from a Converse API request for token counting.

This structure mirrors the input format for the Converse operation, allowing you to count tokens for conversation-based inference requests.

Attributes

additional_model_request_fields class-attribute instance-attribute
additional_model_request_fields: Document | None = None

The additionalModelRequestFields of Converse input request to count tokens for. Use this field when you want to pass additional parameters that the model supports.

messages class-attribute instance-attribute
messages: list[Message] | None = None

An array of messages to count tokens for.

system class-attribute instance-attribute
system: list[SystemContentBlock] | None = None

The system content blocks to count tokens for. System content provides instructions or context to the model about how it should behave or respond. The token count will include any system content provided.

tool_config class-attribute instance-attribute
tool_config: ToolConfiguration | None = None

The toolConfig of Converse input request to count tokens for. Configuration information for the tools that the model can use when generating a response.