<commit_before>require "wechat/api"

if !defined?(WECHAT_LOGGER)
  WECHAT_LOGGER = Logger.new $stdout
end

module Wechat
  autoload :Message, "wechat/message"
  autoload :Responder, "wechat/responder"
  autoload :Response, "wechat/response"

  class AccessTokenExpiredError < StandardError; end
  class ResponseError < StandardError
    attr_reader :error_code
    def initialize(errcode, errmsg)
      error_code = errcode
      super "#{errmsg}(#{error_code})"
    end
  end

  attr_reader :config

  def self.config<commit_msg>[MOD] require logger in bin env<commit_after>require "wechat/api"

if !defined?(WECHAT_LOGGER)
  require 'logger'
  WECHAT_LOGGER = Logger.new $stdout
end

module Wechat
  autoload :Message, "wechat/message"
  autoload :Responder, "wechat/responder"
  autoload :Response, "wechat/response"

  class AccessTokenExpiredError < StandardError; end
  class ResponseError < StandardError
    attr_reader :error_code
    def initialize(errcode, errmsg)
      error_code = errcode
      super "#{errmsg}(#{error_code})"
    end
  end

  attr_reader :config

  def self.config
{'fraction_non_alphanumeric': 0.09115770282588878, 'fraction_numerical': 0.0, 'mean_word_length': 4.382352941176471, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2805473', 'n_tokens_mistral': 372, 'n_tokens_neox': 370, 'n_words': 88}