<commit_before>module DiscourseApi
  module API
    module Uploads
      def upload_file(args)
        args = API.params(args)
                  .optional(:file, :url)
                  .default(type: 'composer', synchronous: true)
                  .to_h
        post('/uploads', args)
      end
    end
  end
end<commit_msg>add user_id optional params for uploads<commit_after>module DiscourseApi
  module API
    module Uploads
      def upload_file(args)
        args = API.params(args)
                  .optional(:file, :url, :user_id)
                  .default(type: 'composer', synchronous: true)
                  .to_h
        post('/uploads', args)
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.09011627906976744, 'fraction_numerical': 0.0, 'mean_word_length': 1.745019920318725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3495820', 'n_tokens_mistral': 206, 'n_tokens_neox': 195, 'n_words': 51}