Exemplo n.º 1
0
        async static Task Status()
        {
            var response = await SendGet(host + path + "train");

            var result = await response.Content.ReadAsStringAsync();

            Console.WriteLine("Requested training status.");
            Console.WriteLine(ProgramHelper.JsonPrettyPrint(result));
            Console.ReadLine();
        }
Exemplo n.º 2
0
        async static Task AddUtterances(string input_file)
        {
            string uri         = host + path + "examples";
            string requestBody = File.ReadAllText("../../Files/" + input_file);

            var response = await SendPost(uri, requestBody);

            var result = await response.Content.ReadAsStringAsync();

            Console.WriteLine("Added utterances.");
            Console.WriteLine(ProgramHelper.JsonPrettyPrint(result));
            Console.ReadLine();
        }
Exemplo n.º 3
0
        async static Task Train(string input_file)
        {
            string uri         = host + path + "train";
            string requestBody = File.ReadAllText("../../Files/" + input_file);

            var response = await SendPost(uri, requestBody);

            var result = await response.Content.ReadAsStringAsync();

            Console.WriteLine("Sent training request.");
            Console.WriteLine(ProgramHelper.JsonPrettyPrint(result));
            await Status();
        }