<commit_before>function luisIntent (session, messages, configObject) {
  if (typeof configObject.luisRecognizer === 'undefined') {
    return null
  }
  return new Promise(resolve=>{
    configObject.luisRecognizer.onRecognize(session.toRecognizeContext(), function (err,result) {
      resolve(result.intent)
    }) 
  })
}

module.exports = luisIntent<commit_msg>refactored<commit_after>function luisIntent (session, messages, configObject) {
  if (typeof configObject.luisRecognizer === 'undefined') {
    return null
  }
  return new Promise((resolve, reject) => {
    configObject.luisRecognizer.onRecognize(session.toRecognizeContext(), function (err, result) {
      if (err) {
        reject(err)
      }
      resolve(result.intent)
    })
  })
}

module.exports = luisIntent

{'fraction_non_alphanumeric': 0.12101910828025478, 'fraction_numerical': 0.0, 'mean_word_length': 4.103896103896104, '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': '6058751', 'n_tokens_mistral': 246, 'n_tokens_neox': 236, 'n_words': 44}