<commit_before># frozen_string_literal: true

require 'httparty'

module Clarinet
  class Client
    include HTTParty

    base_uri 'https://api.clarifai.com/v2'
    headers 'Content-Type' => 'application/json'

    debug_output STDOUT

    def initialize(api_key)
      @auth_headers = {
        'Authorization' => "Key #{api_key}"
      }
    end

    def models(options = {})
      with_response_parsing do
        self.class.get '/models', headers: @auth_headers, query: options
      end<commit_msg>Disable HTTParty debug output<commit_after># frozen_string_literal: true

require 'httparty'

module Clarinet
  class Client
    include HTTParty

    base_uri 'https://api.clarifai.com/v2'
    headers 'Content-Type' => 'application/json'

    def initialize(api_key)
      @auth_headers = {
        'Authorization' => "Key #{api_key}"
      }
    end

    def models(options = {})
      with_response_parsing do
        self.class.get '/models', headers: @auth_headers, query: options
      end
{'fraction_non_alphanumeric': 0.1061061061061061, 'fraction_numerical': 0.002002002002002002, 'mean_word_length': 2.952569169960474, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7449564', 'n_tokens_mistral': 317, 'n_tokens_neox': 313, 'n_words': 72}