(projectId, intentId)
| 15 | 'use strict'; |
| 16 | |
| 17 | async function main(projectId, intentId) { |
| 18 | // [START dialogflow_list_training_phrases] |
| 19 | const {IntentsClient} = require('@google-cloud/dialogflow'); |
| 20 | |
| 21 | // Create the intents client |
| 22 | const intentClient = new IntentsClient(); |
| 23 | |
| 24 | // Specify working intent |
| 25 | const intentName = `projects/${projectId}/agent/intents/${intentId}`; |
| 26 | |
| 27 | // Compose the get-intent request |
| 28 | const getIntentRequest = { |
| 29 | name: intentName, |
| 30 | intentView: 'INTENT_VIEW_FULL', |
| 31 | }; |
| 32 | |
| 33 | const intent = await intentClient.getIntent(getIntentRequest); |
| 34 | |
| 35 | console.log(intent[0].trainingPhrases); |
| 36 | // [END dialogflow_list_training_phrases] |
| 37 | } |
| 38 | |
| 39 | process.on('unhandledRejection', err => { |
| 40 | console.error(err.message); |
no outgoing calls
no test coverage detected