Interface ConverseTokensRequest.Builder

    • Method Detail

      • messages

        ConverseTokensRequest.Builder messages​(Collection<Message> messages)

        An array of messages to count tokens for.

        Parameters:
        messages - An array of messages to count tokens for.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • messages

        ConverseTokensRequest.Builder messages​(Message... messages)

        An array of messages to count tokens for.

        Parameters:
        messages - An array of messages to count tokens for.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • system

        ConverseTokensRequest.Builder system​(Collection<SystemContentBlock> system)

        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.

        Parameters:
        system - 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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • system

        ConverseTokensRequest.Builder system​(SystemContentBlock... system)

        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.

        Parameters:
        system - 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.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toolConfig

        ConverseTokensRequest.Builder toolConfig​(ToolConfiguration toolConfig)

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

        Parameters:
        toolConfig - The toolConfig of Converse input request to count tokens for. Configuration information for the tools that the model can use when generating a response.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • additionalModelRequestFields

        ConverseTokensRequest.Builder additionalModelRequestFields​(Document additionalModelRequestFields)

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

        Parameters:
        additionalModelRequestFields - The additionalModelRequestFields of Converse input request to count tokens for. Use this field when you want to pass additional parameters that the model supports.
        Returns:
        Returns a reference to this object so that method calls can be chained together.