def tone_chat(utterances:, content_language: nil, accept_language: nil)
      raise ArgumentError.new("utterances must be provided") if utterances.nil?

      headers = {
        "Content-Language" => content_language,
        "Accept-Language" => accept_language
      }
      sdk_headers = Common.new.get_sdk_headers("tone_analyzer", "V3", "tone_chat")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version
      }

      data = {
        "utterances" => utterances
      }

      method_url = "/v3/tone_chat"

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
def tone_chat(utterances:, content_language: nil, accept_language: nil)
      raise ArgumentError.new("utterances must be provided") if utterances.nil?

      headers = {
        "Content-Language" => content_language,
        "Accept-Language" => accept_language
      }
      sdk_headers = Common.new.get_sdk_headers("tone_analyzer", "V3", "tone_chat")
      headers.merge!(sdk_headers)

      params = {
        "version" => @version
      }

      data = {
        "utterances" => utterances
      }

      method_url = "/v3/tone_chat"

      response = request(
        method: "POST",
        url: method_url,
        headers: headers,
        params: params,
        json: data,
        accept_json: true
      )
      response
    end
@!method tone_chat(utterances:, content_language: nil, accept_language: nil)
 Analyze customer engagement tone.
 Use the customer engagement endpoint to analyze the tone of customer service and
   customer support conversations. For each utterance of a conversation, the method
   reports the most prevalent subset of the following seven tones: sad, frustrated,
   satisfied, excited, polite, impolite, and sympathetic.

   If you submit more than 50 utterances, the service returns a warning for the
   overall content and analyzes only the first 50 utterances. If you submit a single
   utterance that contains more than 500 characters, the service returns an error for
   that utterance and does not analyze the utterance. The request fails if all
   utterances have more than 500 characters. Per the JSON specification, the default
   character encoding for JSON content is effectively always UTF-8.

   **See also:** [Using the customer-engagement
   endpoint](https://cloud.ibm.com/docs/services/tone-analyzer/using-tone-chat.html#using-the-customer-engagement-endpoint).
 @param utterances [Array[Utterance]] An array of `Utterance` objects that provides the input content that the service
   is to analyze.
 @param content_language [String] The language of the input text for the request: English or French. Regional
   variants are treated as their parent language; for example, `en-US` is interpreted
   as `en`. The input content must match the specified language. Do not submit
   content that contains both languages. You can use different languages for
   **Content-Language** and **Accept-Language**.
   * **`2017-09-21`:** Accepts `en` or `fr`.
   * **`2016-05-19`:** Accepts only `en`.
 @param accept_language [String] The desired language of the response. For two-character arguments, regional
   variants are treated as their parent language; for example, `en-US` is interpreted
   as `en`. You can use different languages for **Content-Language** and
   **Accept-Language**.
 @return [IBMCloudSdkCore::DetailedResponse] A `IBMCloudSdkCore::DetailedResponse` object representing the response.