I have some entities and intent sentences that I could use right away. It is tedious to input them by hand in the UI. I've seen that the output is just a bunch of JSONs although there are some Ids that were generated from the Dialogflow UI.
The question is, can Dialogflow be used like a regular programming language and the somehow package the JSONs into a zip that can be imported. Is the process streamlined somehow with any tool?
Following up on my previous response, these APIs can also be used in creating the agent from scratch as long as you have a GCP project you can link your agent to.
If you're referring to the JSON schema of the exported agent, currently, there’s no JSON schema for the exported agent zip file in the Dialogflow documentation as this is not intended to be edited or replicated. The exported agent zip file is meant to be a backup of your agent for future use. You can use this exported agent to replicate the current agent to a new agent. For restoring and importing agents, you need to upload a zip file which contains the agent.json file as well as the intents or entities folders.
As best practice, it is better to create the agent using Dialogflow APIs if you opt to use JSON files. By following the JSON representation of each type (agent, intents, entities, etc), you will be sure that you are providing the correct and required fields.
Dialogflow has APIs where you can make requests to create and update your agent programmatically. Each Dialogflow edition offers their own API methods.
For Dialogflow Trial and Essentials Edition, you can check the following documentation:
Setup
Dialogflow V2 API reference
Dialogflow V2Beta1 reference
Client Libraries supported
For Dialogflow CX Edition, here are the documentation that will be helpful in creating your agent programmatically:
Setup
Dialogflow CX V3 API reference
Currently available Dialogflow CX client libraries
Related
I have a technical question about the Google Assistant - unfortunately, I couldn't find a clear answer anywhere.
At the moment our company have:
the conversational chatbot built on Dialogflow, which is constantly developed by our employees
Google Actions agent. Our developers managed to construct the connection of the Google account and our client's account on our platform using OAuth 2.0 and created the first actions that, by the exchange of tokens, allow the return of certain information from our platform to the Google Assistant and vice versa - providing certain information in the Google Assistant that are sent and saved in the customer's account on our platform.
We would like both actions on actions.google.com (2) and conversations on Dialogflow (1) to cooperate with each other in the Google Assistant. One team is working on the chatbot, and the other on advanced actions, and we would like it to stay that way.
My question is - is the absolute only way to finally publish it on the google assistant is to migrate the chatbot from Dialogflow to Actions Builder and stop using Dialogflow?
Or maybe there is a simpler solution where both these environments (of course woring on one profile / agent) cooperate with each other and it will be possible to continue working on dialogflow?
We understand the advantages of Action Builder, but Dialogflow is just good enough for our needs.
There are a few angles to how you can approach this, depending on your exact needs and limitations you may accept, but the general answer is "yes, you can do both at the same time".
First, Dialogflow ES continues to support the Actions on Google Integration. Just as your Dialogflow agent integrates with other platforms, it should still be able to integrate with Actions.
There are some caveats (and some upsides!) with this, however:
You'll be using the Actions on Google v2 platform, rather than the v3 that comes with the Action Builder (and newer SDK). If the features you need are supported on v2, then you're fine. (Account Linking is supported in v2.) But if you need some of the features in v3, then you will run into problems.
You can't have used the Action Builder on the same Cloud project, and you should start the integration from the Dialogflow side. (But once you do - you'll be able to use the Actions Console to do things such as submit it for review, etc.)
Make sure you do not "upgrade" from Dialogflow to Actions Builder. This severs the two, so you won't be able to update the Action from Dialogflow.
Another approach is that you can use Action Builder, but have it forward all (or nearly all) of the requests to Dialogflow. Under this scheme, you would have an Action Builder project that has as little as one Scene with an Intent that captures all input, sends that to a webhook you control, which sends it to your Dialogflow agent via the Dialogflow API, gets the response from your Dialogflow agent, and forwards that response through Action Builder.
This is a little more complicated, but may offer some benefits if you want to take advantage of more advanced Action concepts that may not be available using v2.
I'm working on a music player for the Google Assistant Action. Are there pre-built agents for Intents and Trainingsphases available for languages other than English?
It seems possible to upload a JSON file with intents.
Are there resource available for spanish and/or german intents?
I would suggest you to take Intents from pre-built intents, from each intent fetch the training phrase and translate them into desired language then compile intent of your own.
This process requires interacting with Dialogflow using rest API's.
This reference page will help you understand different required API's.
Also, as you said, it is possible to upload json of intents so maybe convert the translated intents into json file and upload them manually.
I have used Dialogflow for developing the app for Google Assistant. I have created intents and entities in the Dialogflow web GUI and I'm using a webhook response for further conversation.
Now I want to build a chatbot that is part of an existing Android or iOS app and use the code I already wrote for Dialogflow as part of this. What do I need to be aware of when I do so? It looks like I can use the SDK for that platform or make calls to the Dialogflow REST API. Which is faster or are there any tradeoffs? Can I use the Dialogflow NLP without going over the network?
Note: Dialogflow API V1 is deprecated and will be shut down on October 23th, 2019.
That means that the official Javascript, native Android, native iOS and Cordova clients will stop working since they all use V1. There's no word if and when these clients will be upgraded to V2.
So the best bet right now is to use the REST APIs.
There are a few things to be aware of when moving from fulfillment that was built for Actions on Google to using this to also provide responses for other platforms. Actions on Google expects the responses to be formatted slightly differently, and if you're using AoG specific characteristics (such as a SimpleResponse object or a Card object), then it might not appear for other Dialogflow integrations. So you'll need to go over your webhook code to make sure what you send back works across platforms. Your logic and the Dialogflow UI builder should pretty much remain the same - it is just your backend that might need some work.
To make the call, as you say, you can either do the REST call yourself or use the SDK built by Dialogflow. While the SDK will be slightly faster, since it is using ProtoBuffs instead of REST, the difference will likely be fairly slight in most cases. If you're planning to stream audio, you will likely need to either use the SDK or your own ProtoBuff implementation because REST doesn't handle that as well. If you're just sending text, and are more comfortable with doing REST APIs, then this is a perfectly reasonable approach.
There is no "local Dialogflow" library. All calls have to go over the network. There are other libraries that do Speech-to-Text and NLP locally if that is what you need.
I have an exported intents & entities zip file from Dialogflow workspace and tried to import this to IBM Watson workspace its not working is there anyway we could do this ?
Is there any methods we could use to migrate intents from Dialogflow to IBM Watson workspace?
Check out a web app called QBox, it's primary purpose is to benchmark your training data, but it also lets you benechmark against multiple providers. If you run a test by uploading your DialogFlow training data, and select IBM Watson as output, you'll get an option on the resut page to download the training data in IBM Watson format.
Select Watson after you've uploaded your training data:
Run the test, wait a few minutes, and on the results page use the menu on the top right to get your Watson formatted training data:
(Disclaimer: this is a tool I work on, so I have not provided a link, but if you Google the name 'Qbox' along with the term 'chatbot', you should find it!)
DialogFlow is a different product than Watson Assistant. Watson Assistant only allows you to import a workspace that was exported from Watson Assistant (using the export workspace option in the UI) so Assistant is not able to import the dialog from DialogFlow.
You can download Intents and Entities in Watson Assistant in CSV format, see https://console.bluemix.net/docs/services/conversation/intents.html#defining-intents and https://console.bluemix.net/docs/services/conversation/entities.html#defining-entities
You can import entities and intents in a CSV format, but they must be in the specific format that Assistant requires. See the previous 2 links.
There is also this open source project Watson Assistant Workbench (WAW) that allows you to use a few additional formats to create your dialog with Watson Assistant.
Watson Assistant Workbench supports the WA JSON format, custom XML format and even MS XLS format which you can use to define your dialog. Then WAW can process all the data and generate a JSON that can be imported into WA.
This might simplify the conversation process as now you need to "only" convert dialog flow format into WAW XML or XLS (where you for example don't need to work with unique ids of the dialog nodes as in WA JSON format).
So just sharing if this might be interesting - the link to GitHub with Watson Assistant Workbench.
I have built multiple actions on Google Assistant using the JSON request and response V2 but I have heard that using Actions SDK for building actions specifically for Google Assistant should be preferred. I am confused whether to use Actions SDK or JSON request response?
For example - On this link, for every sample code there are two tabs, Node.js using Actions SDK and JSON using the JSON request response.
Which one should be preferred and in which scenarios?
Thanks!
Let's first look at what those tabs mean, and then discuss what your best approach should be.
node.js vs JSON tabs
The "node.js" tab shows what the code looks like using the actions-on-google library. For the most part, this library uses the same code if you're using either the Action SDK or using Dialogflow to implement. Where there are differences, the documentation does note how you have to handle them - this is particularly true when it comes to how you have to handle responses.
The "JSON" tab shows what the JSON would look like if you are not using the actions-on-google library and need to send JSON yourself. You might do this because you're using a language besides node.js, or you just want to know what the underlying protocol looks like.
The catch is that the JSON illustrated here is what would be used by the Action on Google JSON protocol. If you're using Dialogflow, then this JSON would be wrapped inside the payload.google field and there are a couple of other differences documented. So when generating JSON for a Dialogflow response, you should use this as a guide, but need to be aware of how it might differ.
What should you use?
What you use depends on what your needs are and what your goals are for developing.
If you are trying to develop something you intend to release, or might do so someday, and you are new to voice or bot interfaces, then you'll probably want to use Dialogflow - no matter what other choices you may make.
If you have your own Natural Language Processing (NLP) system, then you will want to use the Action SDK instead of Dialogflow. How you handle it (using the actions-on-google library or using JSON) will depend on how you need to integrate with that NLP.
If you're familiar with node.js, or want to learn it, then using the actions-on-google library is a good choice and that first tab will help you. (There are other choices. Dialogflow also has a dialogflow-fulfillment library, which is good if you want to be able to support the bot platforms it supports as well. The multivocal library has a more configuration-driven template approach to building a conversational backend that was designed to work with the Assistant and Dialogflow. Both of these illustrate how to do the same things that Google's documentation does.)
If you would rather use another language, you'll need to reference the JSON documentation because there are few complete libraries for these platforms. Your best bet would be to use Dialogflow with JSON. Dialogflow has some example JSON for how to apply the Google documentation you cite to their fulfillment protocol.
Summary
You should probably use Dialogflow.
If you can, use actions-on-google or another library.
If you have a need to use another language or want to use the JSON, be aware of the possible differences.