<commit_before>
//{
//  "version": "string",
//  "sessionAttributes": {
//    "string": object
//  },
//  "response": {
//    "outputSpeech": {
//      "type": "string",
//      "text": "string"
//    },
//    "card": {
//      "type": "string",
//      "title": "string",
//      "content": "string"
//    },
//    "reprompt": {
//      "outputSpeech": {
//        "type": "string",
//        "text": "string"
//      }
//    },
//    "shouldEndSession": true
//  }
//}
var helper = require('./helper');

var speech = {
	outputSpeech: {
		type: "PlainText",
		text: ""
	}
};
var responseBase = {
	version: "1.0",
	response: {
		shouldEndSession: false
	}
};

var defaultBase = {
	version: "1.0",
	response: {
		shouldEndSession: false
	}
};

function generateResponse(text, reprompt, endSession){
	var response = responseBase;
	
	response.shouldEndSession = endSession;
	
	if(text){
		response.response.speech = speech;
		response.response.speech.outputSpeech.text = text;
	}
	
	if(reprompt){
		response.response.reprompt = speech;
		response.response.reprompt.outputSpeech.text = reprompt;
	}

	response.response.speech = speech;
	response.response.reprompt = speech;
	response.response.speech.outputSpeech.text = text;
	response.response.reprompt.outputSpeech.text = reprompt;
	responseBase = defaultBase;
	
	console.log("REPLYING");
	helper.log(response);
	
	return response;
}

module.exports = {
	launch: function(data) {
		console.log("Launching application from alexa!");<commit_msg>MORES<commit_after>
//{
//  "version": "string",
//  "sessionAttributes": {
//    "string": object
//  },
//  "response": {
//    "outputSpeech": {
//      "type": "string",
//      "text": "string"
//    },
//    "card": {
//      "type": "string",
//      "title": "string",
//      "content": "string"
//    },
//    "reprompt": {
//      "outputSpeech": {
//        "type": "string",
//        "text": "string"
//      }
//    },
//    "shouldEndSession": true
//  }
//}
var helper = require('./helper');

var speech = {
	outputSpeech: {
		type: "PlainText",
		text: ""
	}
};
var responseBase = {
	version: "1.0",
	response: {
		shouldEndSession: false
	}
};

var defaultBase = {
	version: "1.0",
	response: {
		shouldEndSession: false
	}
};

function generateResponse(text, reprompt, endSession){
	var response = responseBase;
	
	response.shouldEndSession = endSession;
	
	if(text){
		response.response.speech = speech;
		response.response.speech.outputSpeech.text = text;
	}
	
	if(reprompt){
		response.response.reprompt = speech;
		response.response.reprompt.outputSpeech.text = reprompt;
	}
	
	responseBase = defaultBase;
	
	console.log("REPLYING");
	helper.log(response);
	
	return response;
}

module.exports = {
	launch: function(data) {
		console.log("Launching application from alexa!");
{'fraction_non_alphanumeric': 0.18774632748118955, 'fraction_numerical': 0.002866356144750985, 'mean_word_length': 2.8670360110803323, 'pattern_counts': {'":': 32, '<': 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': '2713888', 'n_tokens_mistral': 1019, 'n_tokens_neox': 970, 'n_words': 171}