From 4689b23d6eba751fa9a863c6de5be38bafa7cf83 Mon Sep 17 00:00:00 2001 From: hchiam Date: Mon, 23 Apr 2018 20:54:37 -0400 Subject: [PATCH] "Or a" for moore natural suggestions. --- Code-Tutor/intents/2.0 what_s code.json | 8 +++---- .../intents/2.0 what_s code_usersays_en.json | 12 +++++----- Code-Tutor/intents/2.1 what_s a variable.json | 8 +++---- .../2.1 what_s a variable_usersays_en.json | 8 +++---- Code-Tutor/intents/2.2 what_s an array.json | 8 +++---- .../2.2 what_s an array_usersays_en.json | 8 +++---- Code-Tutor/intents/2.3 what_s a string.json | 8 +++---- .../2.3 what_s a string_usersays_en.json | 8 +++---- Code-Tutor/intents/2.5 what_s a loop.json | 8 +++---- .../2.5 what_s a loop_usersays_en.json | 8 +++---- .../intents/2.6 what_s an if statement.json | 18 +++++++++++--- ....6 what_s an if statement_usersays_en.json | 4 ++-- .../intents/3.1.2 variable - run code.json | 24 +++++++++++++++---- ...3.1.2 variable - run code_usersays_en.json | 2 +- .../intents/3.2.3 array - run code.json | 24 +++++++++++++++---- .../3.2.3 array - run code_usersays_en.json | 2 +- .../intents/3.3.3 string - run code.json | 18 ++++++++++++-- .../3.3.3 string - run code_usersays_en.json | 2 +- index.js | 4 ++-- 19 files changed, 118 insertions(+), 64 deletions(-) diff --git a/Code-Tutor/intents/2.0 what_s code.json b/Code-Tutor/intents/2.0 what_s code.json index ea714eb..128ed07 100644 --- a/Code-Tutor/intents/2.0 what_s code.json +++ b/Code-Tutor/intents/2.0 what_s code.json @@ -16,15 +16,15 @@ "customizeAudio": true, "items": [ { - "textToSpeech": "What would you like to create? A variable? An array?", + "textToSpeech": "What would you like to create? A variable? Or an array?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? A variable? A string?", + "textToSpeech": "What would you like to create? A variable? Or a string?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? A variable? A loop?", + "textToSpeech": "What would you like to create? A variable? Or a loop?", "displayText": "What would you like to create?" } ] @@ -73,7 +73,7 @@ "priority": 500000, "webhookUsed": false, "webhookForSlotFilling": false, - "lastUpdate": 1524527951, + "lastUpdate": 1524530618, "fallbackIntent": false, "events": [] } \ No newline at end of file diff --git a/Code-Tutor/intents/2.0 what_s code_usersays_en.json b/Code-Tutor/intents/2.0 what_s code_usersays_en.json index b334ad5..acb6d21 100644 --- a/Code-Tutor/intents/2.0 what_s code_usersays_en.json +++ b/Code-Tutor/intents/2.0 what_s code_usersays_en.json @@ -1,6 +1,6 @@ [ { - "id": "d1c47268-21ea-47e6-af16-94208c541909", + "id": "2eb127a7-a5ae-49d5-bd35-39d0973715b0", "data": [ { "text": "what\u0027s programming mean", @@ -12,7 +12,7 @@ "updated": 1524195663 }, { - "id": "ebe34778-9577-4885-b29a-4cff6bbcda81", + "id": "055c3045-a1b5-4fb2-ba70-d946355dd1d5", "data": [ { "text": "what is programming", @@ -24,7 +24,7 @@ "updated": 1523413875 }, { - "id": "51e1e3ba-2c05-4e0e-9ecb-a2b4afe9b8e2", + "id": "f8bd7709-2aa6-43f7-ab7f-1cdb4ebf428b", "data": [ { "text": "what is code", @@ -36,7 +36,7 @@ "updated": 1523413875 }, { - "id": "08d4dbc5-703d-462a-aa91-06c398feab71", + "id": "17c37d0b-ac78-4a38-9391-bce4fc16dbec", "data": [ { "text": "what does code mean", @@ -48,7 +48,7 @@ "updated": 1523413875 }, { - "id": "2847275d-b004-406c-9522-fbb529d05f0b", + "id": "e3b3e641-5a11-4dd0-ab51-f85e0748dd3a", "data": [ { "text": "what does code do", @@ -60,7 +60,7 @@ "updated": 1523413875 }, { - "id": "114a56c3-869e-4cfc-850a-10b211dfb2a7", + "id": "42b4087f-1fd3-444d-a161-4df1cb638179", "data": [ { "text": "what\u0027s code", diff --git a/Code-Tutor/intents/2.1 what_s a variable.json b/Code-Tutor/intents/2.1 what_s a variable.json index 97532cc..37a9ac8 100644 --- a/Code-Tutor/intents/2.1 what_s a variable.json +++ b/Code-Tutor/intents/2.1 what_s a variable.json @@ -16,15 +16,15 @@ "customizeAudio": true, "items": [ { - "textToSpeech": "What would you like to create? A variable? An array?", + "textToSpeech": "What would you like to create? A variable? Or an array?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? A variable? A string?", + "textToSpeech": "What would you like to create? A variable? Or a string?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? A variable? A loop?", + "textToSpeech": "What would you like to create? A variable? Or a loop?", "displayText": "What would you like to create?" } ] @@ -73,7 +73,7 @@ "priority": 500000, "webhookUsed": false, "webhookForSlotFilling": false, - "lastUpdate": 1524527996, + "lastUpdate": 1524530649, "fallbackIntent": false, "events": [] } \ No newline at end of file diff --git a/Code-Tutor/intents/2.1 what_s a variable_usersays_en.json b/Code-Tutor/intents/2.1 what_s a variable_usersays_en.json index 67d2145..96f8d23 100644 --- a/Code-Tutor/intents/2.1 what_s a variable_usersays_en.json +++ b/Code-Tutor/intents/2.1 what_s a variable_usersays_en.json @@ -1,6 +1,6 @@ [ { - "id": "099644a8-9a0e-41ab-a4c0-3e327a27a3dd", + "id": "ec1ac73f-825b-4c9e-a0a2-8e48ab1f9799", "data": [ { "text": "what\u0027s a variable", @@ -12,7 +12,7 @@ "updated": 1524195329 }, { - "id": "3d4bcf4d-a510-4377-a28b-90af5bd0c57a", + "id": "d6a61494-f48b-49cf-8700-008d7786175c", "data": [ { "text": "what does a variable do", @@ -24,7 +24,7 @@ "updated": 1524195329 }, { - "id": "b5a1b1c7-8515-49ce-9373-e8c4a0d132fd", + "id": "842832e5-b1a5-4107-b057-8608e01dd3f6", "data": [ { "text": "what does a variable mean", @@ -36,7 +36,7 @@ "updated": 1524195329 }, { - "id": "05199b67-5f7c-432c-ace9-39e060603bec", + "id": "fc8bff2e-e641-4a02-a536-bf246ab744be", "data": [ { "text": "what is a variable", diff --git a/Code-Tutor/intents/2.2 what_s an array.json b/Code-Tutor/intents/2.2 what_s an array.json index d3105da..ea1ec4b 100644 --- a/Code-Tutor/intents/2.2 what_s an array.json +++ b/Code-Tutor/intents/2.2 what_s an array.json @@ -16,15 +16,15 @@ "customizeAudio": true, "items": [ { - "textToSpeech": "What would you like to create? An array? A variable?", + "textToSpeech": "What would you like to create? An array? Or a variable?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? An array? A string?", + "textToSpeech": "What would you like to create? An array? Or a string?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? An array? A loop?", + "textToSpeech": "What would you like to create? An array? Or a loop?", "displayText": "What would you like to create?" } ] @@ -76,7 +76,7 @@ "priority": 500000, "webhookUsed": false, "webhookForSlotFilling": false, - "lastUpdate": 1524528046, + "lastUpdate": 1524530693, "fallbackIntent": false, "events": [] } \ No newline at end of file diff --git a/Code-Tutor/intents/2.2 what_s an array_usersays_en.json b/Code-Tutor/intents/2.2 what_s an array_usersays_en.json index 7496294..233b33f 100644 --- a/Code-Tutor/intents/2.2 what_s an array_usersays_en.json +++ b/Code-Tutor/intents/2.2 what_s an array_usersays_en.json @@ -1,6 +1,6 @@ [ { - "id": "e1ea73ec-069e-478b-8b9c-1585616e6cd0", + "id": "bf86d8c3-421e-47b7-b826-8b09a3a90549", "data": [ { "text": "what does an array mean", @@ -12,7 +12,7 @@ "updated": 1524526983 }, { - "id": "c0241612-0028-4e88-864f-1de4ba6b84aa", + "id": "cbaa3adf-b78d-41ab-b6f6-3389239fe81d", "data": [ { "text": "what is an array", @@ -24,7 +24,7 @@ "updated": 1524526983 }, { - "id": "c365620e-7a83-4495-8a4f-37ad026c7c95", + "id": "b38f308f-acde-481a-b0e6-056479b701a5", "data": [ { "text": "what does an array do", @@ -36,7 +36,7 @@ "updated": 1524526983 }, { - "id": "4fbd914d-5ab4-4dbd-803e-b0491955bfbb", + "id": "7b971d7e-8d3d-4412-954d-c0e2385a4c99", "data": [ { "text": "what\u0027s an array", diff --git a/Code-Tutor/intents/2.3 what_s a string.json b/Code-Tutor/intents/2.3 what_s a string.json index 0358fcf..3aceaca 100644 --- a/Code-Tutor/intents/2.3 what_s a string.json +++ b/Code-Tutor/intents/2.3 what_s a string.json @@ -16,15 +16,15 @@ "customizeAudio": true, "items": [ { - "textToSpeech": "What would you like to create? A string? An array?", + "textToSpeech": "What would you like to create? A string? Or an array?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? A string? A variable?", + "textToSpeech": "What would you like to create? A string? Or a variable?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? A string? A loop?", + "textToSpeech": "What would you like to create? A string? Or a loop?", "displayText": "What would you like to create?" } ] @@ -73,7 +73,7 @@ "priority": 500000, "webhookUsed": false, "webhookForSlotFilling": false, - "lastUpdate": 1524528098, + "lastUpdate": 1524530706, "fallbackIntent": false, "events": [] } \ No newline at end of file diff --git a/Code-Tutor/intents/2.3 what_s a string_usersays_en.json b/Code-Tutor/intents/2.3 what_s a string_usersays_en.json index 807e925..98f2170 100644 --- a/Code-Tutor/intents/2.3 what_s a string_usersays_en.json +++ b/Code-Tutor/intents/2.3 what_s a string_usersays_en.json @@ -1,6 +1,6 @@ [ { - "id": "f863a43b-b53c-4ec5-bfc3-4b05ab8c65e7", + "id": "30db4f28-02b7-409d-8d8e-f3ba1f4c9642", "data": [ { "text": "what is a string", @@ -12,7 +12,7 @@ "updated": 1522720415 }, { - "id": "465960a3-247a-4066-8858-d304797ac12f", + "id": "65d3826a-5319-42ea-8cc6-55c78cf02216", "data": [ { "text": "what\u0027s a string", @@ -24,7 +24,7 @@ "updated": 1522720415 }, { - "id": "3015d651-ee72-4940-a42e-c63e26d2d92e", + "id": "bdbeb266-3a75-4dd2-8abc-098394ce887c", "data": [ { "text": "what does a string mean", @@ -36,7 +36,7 @@ "updated": 1522720415 }, { - "id": "13f7fac0-ca35-4e90-ae62-c95866afbf28", + "id": "7acc562a-ac75-4315-ac74-4beab741a52d", "data": [ { "text": "what does a string do", diff --git a/Code-Tutor/intents/2.5 what_s a loop.json b/Code-Tutor/intents/2.5 what_s a loop.json index dc41732..8a38600 100644 --- a/Code-Tutor/intents/2.5 what_s a loop.json +++ b/Code-Tutor/intents/2.5 what_s a loop.json @@ -16,15 +16,15 @@ "customizeAudio": true, "items": [ { - "textToSpeech": "What would you like to create? A loop? A variable?", + "textToSpeech": "What would you like to create? A loop? Or a variable?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? A loop? An array?", + "textToSpeech": "What would you like to create? A loop? Or an array?", "displayText": "What would you like to create?" }, { - "textToSpeech": "What would you like to create? A loop? A string?", + "textToSpeech": "What would you like to create? A loop? Or a string?", "displayText": "What would you like to create?" } ] @@ -73,7 +73,7 @@ "priority": 500000, "webhookUsed": false, "webhookForSlotFilling": false, - "lastUpdate": 1524528152, + "lastUpdate": 1524530733, "fallbackIntent": false, "events": [] } \ No newline at end of file diff --git a/Code-Tutor/intents/2.5 what_s a loop_usersays_en.json b/Code-Tutor/intents/2.5 what_s a loop_usersays_en.json index 144f02c..ef54a45 100644 --- a/Code-Tutor/intents/2.5 what_s a loop_usersays_en.json +++ b/Code-Tutor/intents/2.5 what_s a loop_usersays_en.json @@ -1,6 +1,6 @@ [ { - "id": "d3b54eb4-c37b-4c94-9ddc-d544378965bc", + "id": "03d34815-7418-4732-b74d-0196be35b9a3", "data": [ { "text": "what does a loop do", @@ -12,7 +12,7 @@ "updated": 1524105414 }, { - "id": "f52aa042-779b-486e-834c-cb5a041780d8", + "id": "f6b5e3ca-fa53-4611-98ab-647aff11bd7c", "data": [ { "text": "what\u0027s a loop", @@ -24,7 +24,7 @@ "updated": 1524105414 }, { - "id": "e0177e08-9f3c-462d-9c88-827e0fed1cb2", + "id": "ceb87a64-d7d2-4231-870d-d5b3cbcd7d13", "data": [ { "text": "what does a loop mean", @@ -36,7 +36,7 @@ "updated": 1524105414 }, { - "id": "af843d75-ede5-47c4-893a-01ba6bb7f50d", + "id": "9a03da84-7b1a-4e15-b844-182db467044d", "data": [ { "text": "what is a loop", diff --git a/Code-Tutor/intents/2.6 what_s an if statement.json b/Code-Tutor/intents/2.6 what_s an if statement.json index e10d604..df0fcd7 100644 --- a/Code-Tutor/intents/2.6 what_s an if statement.json +++ b/Code-Tutor/intents/2.6 what_s an if statement.json @@ -19,8 +19,20 @@ "platform": "google", "lang": "en", "customizeAudio": true, - "textToSpeech": "What would you like to create? A variable? An array? A string? A loop?", - "displayText": "What would you like to create?" + "items": [ + { + "textToSpeech": "What would you like to create? A variable? Or an array?", + "displayText": "What would you like to create?" + }, + { + "textToSpeech": "What would you like to create? A variable? Or a string?", + "displayText": "What would you like to create?" + }, + { + "textToSpeech": "What would you like to create? A variable? Or a loop?", + "displayText": "What would you like to create?" + } + ] }, { "type": "basic_card", @@ -64,7 +76,7 @@ "priority": 500000, "webhookUsed": false, "webhookForSlotFilling": false, - "lastUpdate": 1524526852, + "lastUpdate": 1524530774, "fallbackIntent": false, "events": [] } \ No newline at end of file diff --git a/Code-Tutor/intents/2.6 what_s an if statement_usersays_en.json b/Code-Tutor/intents/2.6 what_s an if statement_usersays_en.json index 17e2a0a..63c1d37 100644 --- a/Code-Tutor/intents/2.6 what_s an if statement_usersays_en.json +++ b/Code-Tutor/intents/2.6 what_s an if statement_usersays_en.json @@ -1,6 +1,6 @@ [ { - "id": "b3b9c431-766a-4f42-abdb-9d05e5bb76e0", + "id": "9bf7830f-9e61-47fe-b9d1-bbdcc6bfd559", "data": [ { "text": "what\u0027s a if statement", @@ -12,7 +12,7 @@ "updated": 1524195838 }, { - "id": "8c653ba4-79b5-41c6-a04c-9ba656d1deaf", + "id": "b7d04779-d9a7-4b86-981b-a3d12579c7e0", "data": [ { "text": "what\u0027s an if statement", diff --git a/Code-Tutor/intents/3.1.2 variable - run code.json b/Code-Tutor/intents/3.1.2 variable - run code.json index aa46b9b..4bbc850 100644 --- a/Code-Tutor/intents/3.1.2 variable - run code.json +++ b/Code-Tutor/intents/3.1.2 variable - run code.json @@ -25,7 +25,21 @@ "type": "simple_response", "platform": "google", "lang": "en", - "textToSpeech": "What would you like to try next?" + "customizeAudio": true, + "items": [ + { + "textToSpeech": "What would you like to try next? Another variable? Or an array?", + "displayText": "What would you like to try next?" + }, + { + "textToSpeech": "What would you like to try next? An array? Or a string?", + "displayText": "What would you like to try next?" + }, + { + "textToSpeech": "What would you like to try next? An array? Or a loop?", + "displayText": "What would you like to try next?" + } + ] }, { "type": "suggestion_chips", @@ -36,13 +50,13 @@ "title": "another variable" }, { - "title": "an array" + "title": "array" }, { - "title": "a string" + "title": "string" }, { - "title": "a loop" + "title": "loop" } ] }, @@ -61,7 +75,7 @@ "priority": 500000, "webhookUsed": false, "webhookForSlotFilling": false, - "lastUpdate": 1523669280, + "lastUpdate": 1524530859, "fallbackIntent": false, "events": [] } \ No newline at end of file diff --git a/Code-Tutor/intents/3.1.2 variable - run code_usersays_en.json b/Code-Tutor/intents/3.1.2 variable - run code_usersays_en.json index 195236e..c14d688 100644 --- a/Code-Tutor/intents/3.1.2 variable - run code_usersays_en.json +++ b/Code-Tutor/intents/3.1.2 variable - run code_usersays_en.json @@ -1,6 +1,6 @@ [ { - "id": "0acafccd-8ad3-4913-8a84-7dc26ebca736", + "id": "efca6781-6baf-4afd-b071-1069e79ffe46", "data": [ { "text": "run code", diff --git a/Code-Tutor/intents/3.2.3 array - run code.json b/Code-Tutor/intents/3.2.3 array - run code.json index 1584e0c..d7dd78f 100644 --- a/Code-Tutor/intents/3.2.3 array - run code.json +++ b/Code-Tutor/intents/3.2.3 array - run code.json @@ -16,7 +16,21 @@ "type": "simple_response", "platform": "google", "lang": "en", - "textToSpeech": "What would you like to try next?" + "customizeAudio": true, + "items": [ + { + "textToSpeech": "What would you like to try next? Another array? Or a string?", + "displayText": "What would you like to try next?" + }, + { + "textToSpeech": "What would you like to try next? Another array? Or a variable?", + "displayText": "What would you like to try next?" + }, + { + "textToSpeech": "What would you like to try next? Another array? Or a loop?", + "displayText": "What would you like to try next?" + } + ] }, { "type": "suggestion_chips", @@ -27,13 +41,13 @@ "title": "another array" }, { - "title": "a string" + "title": "string" }, { - "title": "a variable" + "title": "variable" }, { - "title": "a loop" + "title": "loop" } ] }, @@ -52,7 +66,7 @@ "priority": 500000, "webhookUsed": false, "webhookForSlotFilling": false, - "lastUpdate": 1523585786, + "lastUpdate": 1524530930, "fallbackIntent": false, "events": [] } \ No newline at end of file diff --git a/Code-Tutor/intents/3.2.3 array - run code_usersays_en.json b/Code-Tutor/intents/3.2.3 array - run code_usersays_en.json index e8c7b81..800804a 100644 --- a/Code-Tutor/intents/3.2.3 array - run code_usersays_en.json +++ b/Code-Tutor/intents/3.2.3 array - run code_usersays_en.json @@ -1,6 +1,6 @@ [ { - "id": "381a1cd9-400e-4dc9-8bb0-2823b332155b", + "id": "4decf1fa-6de6-4f95-be9b-d1698b53f173", "data": [ { "text": "run code", diff --git a/Code-Tutor/intents/3.3.3 string - run code.json b/Code-Tutor/intents/3.3.3 string - run code.json index def6cb1..b5ec4d7 100644 --- a/Code-Tutor/intents/3.3.3 string - run code.json +++ b/Code-Tutor/intents/3.3.3 string - run code.json @@ -18,7 +18,21 @@ "type": "simple_response", "platform": "google", "lang": "en", - "textToSpeech": "What would you like to try next?" + "customizeAudio": true, + "items": [ + { + "textToSpeech": "What would you like to try next? Another string? Or a loop?", + "displayText": "What would you like to try next?" + }, + { + "textToSpeech": "What would you like to try next? Another string? Or an array?", + "displayText": "What would you like to try next?" + }, + { + "textToSpeech": "What would you like to try next? Another string? Or a variable?", + "displayText": "What would you like to try next?" + } + ] }, { "type": "suggestion_chips", @@ -54,7 +68,7 @@ "priority": 500000, "webhookUsed": false, "webhookForSlotFilling": false, - "lastUpdate": 1523585899, + "lastUpdate": 1524530968, "fallbackIntent": false, "events": [] } \ No newline at end of file diff --git a/Code-Tutor/intents/3.3.3 string - run code_usersays_en.json b/Code-Tutor/intents/3.3.3 string - run code_usersays_en.json index 6caa400..b431676 100644 --- a/Code-Tutor/intents/3.3.3 string - run code_usersays_en.json +++ b/Code-Tutor/intents/3.3.3 string - run code_usersays_en.json @@ -1,6 +1,6 @@ [ { - "id": "c7f3b08b-1cd6-457c-b532-eb29a2405079", + "id": "f9912df4-8988-4971-9348-f1e342fe3d4b", "data": [ { "text": "run code", diff --git a/index.js b/index.js index 99f83da..7a45ed4 100644 --- a/index.js +++ b/index.js @@ -199,7 +199,7 @@ exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, resp let say = (what + ' ').repeat(times); - let congrats = `Congrats! You created a loop. You also unlocked a hidden password: "chicken nuggets". What would you like to try next? Another loop? A variable? Or play with sound effects?`; + let congrats = `Congrats! You created a loop. You also unlocked a hidden password: "chicken nuggets". What would you like to try next? Another loop? Or a variable? Or play with sound effects?`; let googleResponse = app.buildRichResponse() .addSimpleResponse(say) @@ -354,7 +354,7 @@ exports.dialogflowFirebaseFulfillment = functions.https.onRequest((request, resp speech: `What would you like to try next? A variable? An array? A string? A loop?`, displayText: 'What would you like to try next?' }) - .addSuggestions(['a variable', `what's a variable?`, 'an array', 'a string', 'a loop', 'try the example again']) + .addSuggestions(['a variable', `what's a variable?`, 'an array', 'a string', 'a loop', 'try the example again', 'sandbox']) app.ask(googleResponse); },