How so I pass google speech to text class token in dialogflow - dialogflow-es

Does anyone have any code example of passing class token in dialogflow. I have a dialogflow agent that links to a fulfillment in app engine. I like to know how I can pass the class token so that the speech to text will work properly. The class tokens are reference here:
https://cloud.google.com/speech-to-text/docs/class-tokens

Related

Is it possible to send images from Dialogflow CX?

I dont find this possibility in the current response types
Yes, it is possible. However, this would depend on the Integration you are using. You may use a custom payload for any rich response of your Agent. If you are using a custom integration, you would have to implement it on your own.
In my end, I have tested it using Dialogflow CX Messenger.
I selected a custom payload in the "Add dialogue option" and followed the format of the payload in the image response type of Dialogflow CX Messenger.
See screenshot below of the test I made in Dialogflow CX Messenger:
Note that images will not show in the console's "Test Agent" section, instead you can only see the JSON when you expand the custom payload tag in the Agent’s response.
Note that the example provided above is for Dialogflow Messenger. Currently, Dialogflow CX doesn't support Twilio’s WhatsApp as a built-in integration. Since you are using your own custom implementation to integrate Dialogflow with Twilio's WhatsApp, you can follow the payload format of the image response type for Twilio's WhatsApp and send it as a custom payload from Dialogflow.
Then in your backend service, you can get the payload from Dialogflow's detectIntentResponse.query_result.response_messages[].payload, parse it and create the valid Twilio's WhatsApp response format before sending it to Twilio's WhatsApp.

How to passg customer token into IBM Watson Assistant

I want to use various fields such as customer token, customer id etc. in each session created in watson assistant v2 using nodejs.
Can I pass it directly in the createSession function or do I need to create an entitiy or intent for it to pass in Watson Assistant?
You need to pass it with the message where you want to use it. See the context parameter in that message API function. This could be the first message. The context usually stays unchanged until you overwrite the values or delete the context variable.

Integrate google assistant with external chat bot data source instead of sing dialog flow or actions on google

We are trying to develop an application with Google Assistant. We already have a chat bot data source. Is it possible to connect Google Assistant to a third party data source instead of using Dialogflow. So in the final solution the Google Assistant will act as speech to text and text to speech medium.
Yes, you can take a look at the Action SDK, which will POST to your webhook containing a JSON payload that includes the speech-to-text, and receive a response from you a JSON payload consisting of your reply.

How to wrap a chatbot created in Google's dialogflow.com in a different app?

I created a very basic and simple chatbot by Google's DialogFlow.com. DialogFlow allows us to embed the chatbot with a webpage by <iframe> but my intent is to use the bot for different users to track what each use may have to say. Is it possible to interact with the created chatbot by a POST request?
For e.g. when a user types in "Hello my friend" we would be able to POST it to dialogflow chatbot and get response back for that specific chat instance? If so how?

Making Api.ai parameters required based on source.

I am new to dialogflow. I have the following requirement.
If user pings from api.i webview , a parameter should be made required.
If user pings from facebook messenger, a parameter should not be made required.
To achieve this, you can mark the value as required in your intent, then tell Dialogflow to use your webhook for slot-filling.
When the intent is matched, your webhook will receive a request that, if from the Facebook integration, will contain the originalRequest from Facebook.
If you detect the Facebook integration, you can respond to Dialogflow from your webhook including a value for the parameter, and Dialogflow will not prompt for it. If you do not detect Facebook, respond without the value and Dialogflow will prompt the user for it.

Resources