Skip to content

Commit f2ac0c8

Browse files
Xudong MaNimJay
Xudong Ma
authored andcommitted
fix(samples): update the type of Training phases per (#131)
https://dialogflow.com/docs/reference/api-v2/rest/Shared.Types/Type.
1 parent f66c703 commit f2ac0c8

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

dialogflow/resource.js

+15-15
Original file line numberDiff line numberDiff line change
@@ -367,10 +367,10 @@ function createIntents(projectId) {
367367

368368
// The phrases for training the linguistic model.
369369
const pizzaPhrases = [
370-
{type: 'TYPE_EXAMPLE', parts: [{text: 'Order pizza'}]},
371-
{type: 'TYPE_EXAMPLE', parts: [{text: 'Pizza'}]},
370+
{type: 'EXAMPLE', parts: [{text: 'Order pizza'}]},
371+
{type: 'EXAMPLE', parts: [{text: 'Pizza'}]},
372372
{
373-
type: 'TYPE_EXAMPLE',
373+
type: 'EXAMPLE',
374374
parts: [
375375
{text: 'Get me a '},
376376
{text: 'large', entityType: '@size', alias: 'size'},
@@ -385,7 +385,7 @@ function createIntents(projectId) {
385385
],
386386
},
387387
{
388-
type: 'TYPE_EXAMPLE',
388+
type: 'EXAMPLE',
389389
parts: [
390390
{text: "I'd like to order a "},
391391
{text: 'large', entityType: '@size', alias: 'size'},
@@ -394,7 +394,7 @@ function createIntents(projectId) {
394394
],
395395
},
396396
{
397-
type: 'TYPE_TEMPLATE',
397+
type: 'TEMPLATE',
398398
parts: [{text: "I'd like a @size:size pizza"}],
399399
},
400400
];
@@ -498,7 +498,7 @@ function createIntents(projectId) {
498498
// template.
499499
const changeDeliveryAddressPhrases = [
500500
{
501-
type: 'TYPE_EXAMPLE',
501+
type: 'EXAMPLE',
502502
parts: [
503503
{text: 'Change address to '},
504504
{
@@ -509,7 +509,7 @@ function createIntents(projectId) {
509509
],
510510
},
511511
{
512-
type: 'TYPE_EXAMPLE',
512+
type: 'EXAMPLE',
513513
parts: [
514514
{
515515
text: '1 1st st, new york, ny',
@@ -592,10 +592,10 @@ function createIntents(projectId) {
592592
};
593593

594594
const placeOrderPhrases = [
595-
{type: 'TYPE_EXAMPLE', parts: [{text: 'check'}]},
596-
{type: 'TYPE_EXAMPLE', parts: [{text: 'confirm'}]},
597-
{type: 'TYPE_EXAMPLE', parts: [{text: 'yes'}]},
598-
{type: 'TYPE_EXAMPLE', parts: [{text: 'place order'}]},
595+
{type: 'EXAMPLE', parts: [{text: 'check'}]},
596+
{type: 'EXAMPLE', parts: [{text: 'confirm'}]},
597+
{type: 'EXAMPLE', parts: [{text: 'yes'}]},
598+
{type: 'EXAMPLE', parts: [{text: 'place order'}]},
599599
];
600600

601601
const placeOrderIntent = {
@@ -636,10 +636,10 @@ function createIntents(projectId) {
636636
};
637637

638638
const cancelOrderPhrases = [
639-
{type: 'TYPE_EXAMPLE', parts: [{text: 'cancel'}]},
640-
{type: 'TYPE_EXAMPLE', parts: [{text: 'no'}]},
641-
{type: 'TYPE_EXAMPLE', parts: [{text: 'cancel order'}]},
642-
{type: 'TYPE_EXAMPLE', parts: [{text: "I don't want it any more"}]},
639+
{type: 'EXAMPLE', parts: [{text: 'cancel'}]},
640+
{type: 'EXAMPLE', parts: [{text: 'no'}]},
641+
{type: 'EXAMPLE', parts: [{text: 'cancel order'}]},
642+
{type: 'EXAMPLE', parts: [{text: "I don't want it any more"}]},
643643
];
644644

645645
const cancelOrderIntent = {

0 commit comments

Comments
 (0)