Skip to content

ConverseTokensRequest

Source code in docs_src/capo_bedrock_runtime/types/converse_tokens_request.py
class ConverseTokensRequest(TypedDict, closed=True):
    messages: NotRequired["capo_bedrock_runtime.types.messages.Messages"]
    """<p>An array of messages to count tokens for.</p>"""
    system: NotRequired[
        "capo_bedrock_runtime.types.system_content_blocks.SystemContentBlocks"
    ]
    """<p>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.</p>"""
    tool_config: NotRequired[
        "capo_bedrock_runtime.types.tool_configuration.ToolConfiguration"
    ]
    """<p>The toolConfig of Converse input request to count tokens for. Configuration information for the tools that the model can use when generating a response.</p>"""
    additional_model_request_fields: NotRequired["object"]
    """<p>The additionalModelRequestFields of Converse input request to count tokens for. Use this field when you want to pass additional parameters that the model supports.</p>"""

additional_model_request_fields instance-attribute

additional_model_request_fields: NotRequired[object]

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 instance-attribute

messages: NotRequired[Messages]

An array of messages to count tokens for.

system instance-attribute

system: NotRequired[SystemContentBlocks]

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 instance-attribute

tool_config: NotRequired[ToolConfiguration]

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