Last week, Dialogflow announced the availability of v2 of their API. It is still in beta, and there are some fairly significant changes coming up.
[Also, a quick comment that I am very glad they changed their name from API.AI before this announcement. Otherwise people will be referring to API.AI API v2 vs API.AI API v1 etc. I am guessing even Google would have been so confused by this that it wouldn’t have even been possible to search for stuff. 🙂 ]
Here are the changes that I could notice straight away
Access via RPC
You can also use RPC and not only REST for accessing the v2 API.
The documentation for RPC based access can be found here.
You don’t use Client or Developer Access Token
This is an important update. All calls made to API v2 will be made using a different Auth mechanism.
I have already mentioned that I didn’t quite like the way the Client Access Token was being used in web based chatbots. This new change forces people to pay much closer attention to the authentication, which in turn should also help them think through how they ultimately use it.
A new Auth mechanism
This is related to the previous point.
The new authentication mechanism is based on generating a token after logging into your Google cloud console. The documentation isn’t super elaborate at this point, but clearly it is more work than creating a new agent inside the Dialogflow console and going over to the Settings tab and copying the Client Access Token and Developer Access Token.
Not backwards compatible with v1
There are a ton of improvements in the v2 API, so this shouldn’t be surprising. Your old v1 API calls cannot be used by simply changing the auth token, for example.
You need to get familiar with the Google Cloud services
One of the important changes for people using Dialogflow is the move towards learning more about the Google Cloud.
For example, the new Auth mechanism starts with the Google Cloud Platform Service account:
Audio requests via API
There are also additional quotas for audio requests using the v2 API. How is the audio being converted to text? Using IBM Watson’s speech to text engine.
Just checking if you are paying attention 🙂 . It actually uses the Google Cloud Speech API . And now you know that there is a lot of competition in this domain, and you would need to think hard about this type of service bundling if you ever need to use disparate APIs.
Agent Management via API
The v2 API provides an option to export, import and restore ZIP files programmatically. In addition, you can get a list of agents associated with the account, and also train a specific agent programmatically.
Check out my free Udemy course: Zoho Deluge Script Quickstart for Programmers
This website contains affiliate links. See the disclosure page for more details.
"The magic key I needed as a non-programmer" The custom payload generator was the magic key I needed (as a non-programmer) to build a good demo with rich responses in DialogFlow Messenger. I've only used it for 30 minutes and am thrilled. I've spent hours trying to figure out some of the intricacies of DialogFlow on my own. Over and over, I kept coming back to Aravind's tutorials available on-line. I trust the other functionalities I learn to use in the app will save me additional time and heartburn. - Kathleen R Cofounder, gathrHealth