MCPcopy Create free account
hub / github.com/GoogleCloudPlatform/nodejs-docs-samples / deleteIntent

Function deleteIntent

dialogflow/resource.js:21–38  ·  view source on GitHub ↗
(projectId, intentId)

Source from the content-addressed store, hash-verified

19// /////////////////////////////////////////////////////////////////////////////
20
21async function deleteIntent(projectId, intentId) {
22 // [START dialogflow_delete_intent]
23 // Imports the Dialogflow library
24 const dialogflow = require('@google-cloud/dialogflow');
25
26 // Instantiates clients
27 const intentsClient = new dialogflow.IntentsClient();
28
29 const intentPath = intentsClient.projectAgentIntentPath(projectId, intentId);
30
31 const request = {name: intentPath};
32
33 // Send the request for deleting the intent.
34 const result = await intentsClient.deleteIntent(request);
35 console.log(`Intent ${intentPath} deleted`);
36 return result;
37 // [END dialogflow_delete_intent]
38}
39
40// /////////////////////////////////////////////////////////////////////////////
41// Operations for session entity type

Callers 1

resource.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected