<commit_before>/**
 * This code implements an integration of SAP Business One on HANA with Amazon Alexa
 * 
 * For instrunctions and changelog please check the GitHub Repository
 * 
 * Athors: 
 * <NAME> - B1 Solution Architect - Twitter: @Ralphive
 * <NAME> - Solution Architect - Twitter: @YatseaLi
 * All rights resversed by SAP SE
 * last mondifed on Mar 27 2017
 * License: This is not an offiical solution from SAP. The code is published with SCN AS-IS license.
 * You can download and modify this code by yourself. No SAP official support available.
 */

// Route the incoming request based on type (LaunchRequest, IntentRequest,
// etc.) The JSON body of the request is provided in the event parameter.

var g_hdbServer = '<YOUR HANA HOST or IP Address HERE!>';
var g_hdbPort  = 8000; // Http(8000) or Https(4300)
var g_hdbService = '/b1Assistant/services';
var g_currFinPeriod = null;
var SocialMediaIntegration = false // Set this to true in case Twitter Integration is deployed

exports.handler = function (event, context) {
    try {
        //console.log("event.session.application.applicationId=" + event.session.application.applicationId);

        /**
         * prevent someone else from configuring a skill that sends requests to this function.
         * To be uncommented when SKill is ready
        
        if (event.session.application.applicationId !== "amzn1.echo-sdk-ams.app.c014e6d6-a7a4-44ee-8b2f-9b10c7969743") {
             context.fail("Invalid Application ID");
        }p
         */

        if (event.session.new) {
            onSessionStarted({
                requestId: event.request.requestId
            }, event.session);<commit_msg>Add environment variables to HANA host and port<commit_after>/**
 * This code implements an integration of SAP Business One on HANA with Amazon Alexa
 * 
 * For instrunctions and changelog please check the GitHub Repository
 * 
 * Athors: 
 * <NAME> - B1 Solution Architect - Twitter: @Ralphive
 * <NAME> - Solution Architect - Twitter: @YatseaLi
 * All rights resversed by SAP SE
 * last mondifed on Mar 27 2017
 * License: This is not an offiical solution from SAP. The code is published with SCN AS-IS license.
 * You can download and modify this code by yourself. No SAP official support available.
 */

// Route the incoming request based on type (LaunchRequest, IntentRequest,
// etc.) The JSON body of the request is provided in the event parameter.

var g_hdbServer = process.env.HDBHOST || '<YOUR HANA HOST or IP Address HERE!>';
var g_hdbPort  = process.env.HDBPORT || 8000; // Http(8000) or Https(4300)
var g_hdbService = '/b1Assistant/services';
var g_currFinPeriod = null;
var SocialMediaIntegration = false // Set this to true in case Twitter Integration is deployed

exports.handler = function (event, context) {
    try {
        //console.log("event.session.application.applicationId=" + event.session.application.applicationId);

        /**
         * prevent someone else from configuring a skill that sends requests to this function.
         * To be uncommented when SKill is ready
        
        if (event.session.application.applicationId !== "amzn1.echo-sdk-ams.app.c014e6d6-a7a4-44ee-8b2f-9b10c7969743") {
             context.fail("Invalid Application ID");
        }p
         */

        if (event.session.new) {
            onSessionStarted({
                requestId: event.request.requestId
            }, event.session);
{'fraction_non_alphanumeric': 0.087995337995338, 'fraction_numerical': 0.024475524475524476, 'mean_word_length': 3.019906323185012, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5973385', 'n_tokens_mistral': 1032, 'n_tokens_neox': 950, 'n_words': 358}