code: async function createEntity(projectId, entityTypeId, entityValue, synonyms) {
    // [START dialogflow_create_entity]
    // Imports the Dialogflow library
    const dialogflow = require('dialogflow');
  
    // Instantiates clients
    const entityTypesClient = new dialogflow.EntityTypesClient();
  
    // The path to the agent the created entity belongs to.
    const agentPath = entityTypesClient.entityTypePath(projectId, entityTypeId);
  
    const entity = {
      value: entityValue,
      synonyms: synonyms,
    };
  
    const createEntitiesRequest = {
      parent: agentPath,
      entities: [entity],
    };
  
    const [response] = await entityTypesClient.batchCreateEntities(
      createEntitiesRequest
    );
    console.log('Created entity type:');
    console.log(response);
    // [END dialogflow_create_entity]
  }
docs: ///////////////////////////////////////////////////////////////////////////// Operations for entities. /////////////////////////////////////////////////////////////////////////////