<commit_before>import { createClient } from 'flashheart';
import logger from '../logger';
import { JokeCategoryEnum } from '../graphql/types';

const http = createClient({ logger });

const getRandomJokeByCategory = async (category: JokeCategoryEnum): Promise<any> => {
  const uri = `${process.env.JOKE_SERVICE_URL}/jokes/random${category ? `?limitTo=[${category.toLowerCase()}]` : ''}`;

  const { value } = await http.getAsync(uri);

  return value;
};

export {
  getRandomJokeByCategory,
};<commit_msg>fix missing import<commit_after>import { createClient } from 'flashheart';
import logger from '../logger';
import { JokeCategoryEnum } from '../graphql/_generated/types';

const http = createClient({ logger });

const getRandomJokeByCategory = async (category: JokeCategoryEnum): Promise<any> => {
  const uri = `${process.env.JOKE_SERVICE_URL}/jokes/random${category ? `?limitTo=[${category.toLowerCase()}]` : ''}`;

  const { value } = await http.getAsync(uri);

  return value;
};

export {
  getRandomJokeByCategory,
};
{'fraction_non_alphanumeric': 0.16213592233009708, 'fraction_numerical': 0.0, 'mean_word_length': 5.44375, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '7283325', 'n_tokens_mistral': 313, 'n_tokens_neox': 318, 'n_words': 70}