I am building a dialogflow Agent. I am using Node.js client library for dialogflow. When I call BatchUpdateIntents it works perfectly but also creates the intents if its already present in the agent, means api call does not prevent duplicate intents while it should have to be.
code sample
const createIntentRequest = {
parent: agentPath,
intentBatchInline: {
intents: intents
}
};
const [operation] = await intentsClient.batchUpdateIntents(createIntentRequest);
const [ response ] = await operation.promise();
Can someone guide me how to prevent intent duplication using Node.js client library?