Migrate from V2 BETA to the generally available V2 API

The Dialogflow V2 API is now generally available. You should migrate any production agents on V2 BETA API to Dialogflow's generally available V2 API. The V2 BETA API will continue to exist, and new experimental beta features will continue to be added to Dialogflow's V2 BETA API. This document describes how to migrate from Dialogflow's V2 BETA API to Dialogflow's generally available V2 API.

REST API

Dialogflow has different REST API endpoints for V2 BETA and the generally available V2 API. To migrate from Dialogflow V2 BETA to generally available V2, please update your code as indicated in the table below:

V2 BETA REST API Base URL Generally Available V2 REST API Base URl
https://dialogflow.googleapis.com/v2beta1 https://dialogflow.googleapis.com/v2/

With the exception of the mlEnabled field, v2beta1 and v2 REST APIs are the same.

Client libraries

Dialogflow beta client libraries are available in Node.js, Python, and Java. To migrate from Dialogflow V2 BETA libraries to generally available V2 libraries, please update your include/import code as indicated in the table below:

Platform v2beta1 include/import v2 include/import
Node.js const dialogflow = require('dialogflow').v2beta1; const dialogflow = require('dialogflow');
Python import dialogflow_v2beta1 import dialogflow
Java import com.google.cloud.dialogflow.v2beta1.*; import com.google.cloud.dialogflow.v2.*;

With the exception of the ml_enabled field, v2beta1 and v2 client libraries are the same.

Machine learning field name changed from enabled to disabled

In Dialogflow V2 BETA, the field mlEnabled (ml_enabled) defaulted to the value false, meaning that ML was disabled by default. In Dialogflow's generally available v2, the field name has been changed to mlDisabled (ml_disabled). Its default value is also 'false', meaning that ML is enabled by default. You can see a comparison of the behavior of this field and the differences between V2 BETA and generally available v2 below:

V2 BETA V2 Generally Available
Field: REST name (gRPC name) mlEnabled (ml_enabled) mlDisabled (ml_disabled)
Value when ML is enabled `true` `false` (default value)
Value when ML is disabled `false` (default value) `true`

All REST API methods that alter intents are affected by this change and are listed below:

REST V2 BETA V2 Generally Available
Create Intent Documentation Documentation
Update Intent Documentation Documentation
Batch Update Intent Documentation Documentation

All gRPC API methods that alter intents are affected by this change and are listed below:

gRPC V2 BETA V2 BETA
Create Intent Documentation Documentation
Update Intent Documentation Documentation
Batch Update Intent Documentation Documentation