From f2ac0c8e55680f7c9acb34026157aef353d3149e Mon Sep 17 00:00:00 2001 From: Xudong Ma Date: Tue, 17 Jul 2018 13:58:27 -0700 Subject: [PATCH] fix(samples): update the type of Training phases per (#131) https://dialogflow.com/docs/reference/api-v2/rest/Shared.Types/Type. --- dialogflow/resource.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dialogflow/resource.js b/dialogflow/resource.js index b0de381076..655810e936 100644 --- a/dialogflow/resource.js +++ b/dialogflow/resource.js @@ -367,10 +367,10 @@ function createIntents(projectId) { // The phrases for training the linguistic model. const pizzaPhrases = [ - {type: 'TYPE_EXAMPLE', parts: [{text: 'Order pizza'}]}, - {type: 'TYPE_EXAMPLE', parts: [{text: 'Pizza'}]}, + {type: 'EXAMPLE', parts: [{text: 'Order pizza'}]}, + {type: 'EXAMPLE', parts: [{text: 'Pizza'}]}, { - type: 'TYPE_EXAMPLE', + type: 'EXAMPLE', parts: [ {text: 'Get me a '}, {text: 'large', entityType: '@size', alias: 'size'}, @@ -385,7 +385,7 @@ function createIntents(projectId) { ], }, { - type: 'TYPE_EXAMPLE', + type: 'EXAMPLE', parts: [ {text: "I'd like to order a "}, {text: 'large', entityType: '@size', alias: 'size'}, @@ -394,7 +394,7 @@ function createIntents(projectId) { ], }, { - type: 'TYPE_TEMPLATE', + type: 'TEMPLATE', parts: [{text: "I'd like a @size:size pizza"}], }, ]; @@ -498,7 +498,7 @@ function createIntents(projectId) { // template. const changeDeliveryAddressPhrases = [ { - type: 'TYPE_EXAMPLE', + type: 'EXAMPLE', parts: [ {text: 'Change address to '}, { @@ -509,7 +509,7 @@ function createIntents(projectId) { ], }, { - type: 'TYPE_EXAMPLE', + type: 'EXAMPLE', parts: [ { text: '1 1st st, new york, ny', @@ -592,10 +592,10 @@ function createIntents(projectId) { }; const placeOrderPhrases = [ - {type: 'TYPE_EXAMPLE', parts: [{text: 'check'}]}, - {type: 'TYPE_EXAMPLE', parts: [{text: 'confirm'}]}, - {type: 'TYPE_EXAMPLE', parts: [{text: 'yes'}]}, - {type: 'TYPE_EXAMPLE', parts: [{text: 'place order'}]}, + {type: 'EXAMPLE', parts: [{text: 'check'}]}, + {type: 'EXAMPLE', parts: [{text: 'confirm'}]}, + {type: 'EXAMPLE', parts: [{text: 'yes'}]}, + {type: 'EXAMPLE', parts: [{text: 'place order'}]}, ]; const placeOrderIntent = { @@ -636,10 +636,10 @@ function createIntents(projectId) { }; const cancelOrderPhrases = [ - {type: 'TYPE_EXAMPLE', parts: [{text: 'cancel'}]}, - {type: 'TYPE_EXAMPLE', parts: [{text: 'no'}]}, - {type: 'TYPE_EXAMPLE', parts: [{text: 'cancel order'}]}, - {type: 'TYPE_EXAMPLE', parts: [{text: "I don't want it any more"}]}, + {type: 'EXAMPLE', parts: [{text: 'cancel'}]}, + {type: 'EXAMPLE', parts: [{text: 'no'}]}, + {type: 'EXAMPLE', parts: [{text: 'cancel order'}]}, + {type: 'EXAMPLE', parts: [{text: "I don't want it any more"}]}, ]; const cancelOrderIntent = {