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.