<commit_before>﻿var openWhiskWebUrl = 'https://openwhisk.ng.bluemix.net/api/v1/web/erhe1011%40hs-karlsruhe.de_iwibot/default/home.text';
var openWhiskUrl = 'https://openwhisk.ng.bluemix.net/api/v1/namespaces/erhe1011%40hs-karlsruhe.de_iwibot/actions/home';
var username = '80bb0dcc-75e6-<PASSWORD>-<PASSWORD>';
var password = '<PASSWORD>';

var textToSpeechWebUrl = 'https://openwhisk.ng.bluemix.net/api/v1/web/Hochschule_Test/default/TTS.json';
var textToSpeechUrl = '';
var ttsUsername = '';
var ttsPassword = '';

$(document).ready(function () {
    $('#chatForm').submit(function (event) {
        
        event.preventDefault();

        var text = $('#messageField').val();

        $('#chat').append('<div class="msg myMsg"><div>' + text + '<div></div>');
        
        console.log(text);
        $.ajax({
            beforeSend: function (xhr) {
                //xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
            },
            url: openWhiskWebUrl,
            method: "POST",
            dataType: "jsonp",
            data: { message: text }
        })
            .done(function (data) {
                console.log(data);

                $('#chat').append('<div class="msg"><div>' + data.output.text + '<div></div>');
            });
    })

});

$(function () {
    debugger
    $.ajax({
        beforeSend: function (xhr) {
            //xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
        },
        url: textToSpeechWebUrl,
        method: "POST",
        dataType: "jsonp",
        data: { message: text }
    })
        .done(function (data) {
            debugger
            console.log(data);

            $('#chat').append('<div class="msg"><div>' + data.output.text + '<div></div>');
        });
});<commit_msg>Text to Speech Service debugger entfernt<commit_after>﻿var openWhiskWebUrl = 'https://openwhisk.ng.bluemix.net/api/v1/web/erhe1011%40hs-karlsruhe.de_iwibot/default/home.text';
var openWhiskUrl = 'https://openwhisk.ng.bluemix.net/api/v1/namespaces/erhe1011%40hs-karlsruhe.de_iwibot/actions/home';
var username = '80bb0dcc-75e6-<PASSWORD>';
var password = '<PASSWORD>';

var textToSpeechWebUrl = 'https://openwhisk.ng.bluemix.net/api/v1/web/Hochschule_Test/default/TTS.json';
var textToSpeechUrl = '';
var ttsUsername = '';
var ttsPassword = '';

$(document).ready(function () {
    $('#chatForm').submit(function (event) {
        
        event.preventDefault();

        var text = $('#messageField').val();

        $('#chat').append('<div class="msg myMsg"><div>' + text + '<div></div>');
        
        console.log(text);
        $.ajax({
            beforeSend: function (xhr) {
                //xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
            },
            url: openWhiskWebUrl,
            method: "POST",
            dataType: "jsonp",
            data: { message: text }
        })
            .done(function (data) {
                console.log(data);

                $('#chat').append('<div class="msg"><div>' + data.output.text + '<div></div>');
            });
    })

});

$(function () {
    /*
    $.ajax({
        beforeSend: function (xhr) {
            //xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
        },
        url: textToSpeechWebUrl,
        method: "POST",
        dataType: "jsonp",
        data: { text: 'Hallo' }
    })
        .done(function (data) {
            console.log(data);

            $('#chat').append('<div class="msg"><div>' + data.output.text + '<div></div>');
        });
        */
});
{'fraction_non_alphanumeric': 0.18821917808219177, 'fraction_numerical': 0.011506849315068493, 'mean_word_length': 2.2921550946798916, 'pattern_counts': {'":': 4, '<': 32, '<?xml version=': 0, '>': 32, 'https://': 6, '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': '6259541', 'n_tokens_mistral': 1208, 'n_tokens_neox': 1185, 'n_words': 173}