<commit_before>module CanTango::Api
  module Common
    def create_ability candidate, opts = {}
      config.ability.factory_build candidate, opts.merge(:modes => execution_modes)
    end

    def category label
      config.models.by_category label
    end
    
    protected

    def execution_modes
      CanTango.config.modes.registered || [:no_cache]
    end
    
    def config
      CanTango.config
    end
  end
end
<commit_msg>use ability modes<commit_after>module CanTango::Api
  module Common
    def create_ability candidate, opts = {}
      config.ability.factory_build candidate, opts.merge(:modes => execution_modes)
    end

    def category label
      config.models.by_category label
    end
    
    protected

    def execution_modes
      CanTango.config.ability.modes.registered || [:no_cache]
    end
    
    def config
      CanTango.config
    end
  end
end

{'fraction_non_alphanumeric': 0.0667420814479638, 'fraction_numerical': 0.0, 'mean_word_length': 2.627049180327869, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '2329870', 'n_tokens_mistral': 269, 'n_tokens_neox': 254, 'n_words': 64}