<commit_before>import * as express from 'express';
import * as jibe from '../service/jibe';
import * as models from '../models/models';

let avatars: Map<string, string>
avatars.set('aang', 'Aang-256');
avatars.set('iroh', 'GeneralIroh-256');
avatars.set('tylee', 'TyLee-256');
avatars.set('Toph', 'Toph-256');

function avatar(req: express.Request, res: express.Response) {

    // verify request
    if (req.body['token'] != '<KEY>') {
        return res.status(401).send("Unauthorized");
    }

    let name = avatars.get(req.body["text"])
    if (name === undefined) {
        name = "Unknown-48"
    }

    res.json({
        "response_type": "ephemeral",
        "attachments": [{
            "image_url": "https://jibe.azurewebsites.net/assets/images/avatars/" + name + ".png",
        }]
    })
}

class SlashMessage {
    response_type: string = "ephemeral";
    attachments: SlackAttachment[];<commit_msg>fix contructor<commit_after>import * as express from 'express';
import * as jibe from '../service/jibe';
import * as models from '../models/models';

let avatars = new Map<string, string>()
avatars.set('aang', 'Aang-256');
avatars.set('iroh', 'GeneralIroh-256');
avatars.set('tylee', 'TyLee-256');
avatars.set('Toph', 'Toph-256');

function avatar(req: express.Request, res: express.Response) {

    // verify request
    if (req.body['token'] != '<KEY>') {
        return res.status(401).send("Unauthorized");
    }

    let name = avatars.get(req.body["text"])
    if (name === undefined) {
        name = "Unknown-48"
    }

    res.json({
        "response_type": "ephemeral",
        "attachments": [{
            "image_url": "https://jibe.azurewebsites.net/assets/images/avatars/" + name + ".png",
        }]
    })
}

class SlashMessage {
    response_type: string = "ephemeral";
    attachments: SlackAttachment[];
{'fraction_non_alphanumeric': 0.18607181719260066, 'fraction_numerical': 0.018498367791077257, 'mean_word_length': 3.217889908256881, 'pattern_counts': {'":': 6, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '1424276', 'n_tokens_mistral': 661, 'n_tokens_neox': 614, 'n_words': 125}