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

Function listIntents

dialogflow-cx/list-intents.js:35–50  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33 const client = new IntentsClient();
34
35 async function listIntents() {
36 const parent = client.agentPath(projectId, location, agentId);
37 console.info(parent);
38
39 const [intents] = await client.listIntents({
40 parent,
41 pageSize: 100,
42 });
43 intents.forEach(intent => {
44 console.log('====================');
45 console.log(`Intent name: ${intent.name}`);
46 console.log(`Intent display name: ${intent.displayName}`);
47 console.log(`# Parameters: ${intent.parameters.length}`);
48 console.log(`# Training Phrases: ${intent.trainingPhrases.length}`);
49 });
50 }
51
52 listIntents();
53 // [END dialogflow_cx_list_intents]

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected