Dialogflow CX(sending custom pay) - dialogflow-cx

I am using Dialogflow CX and I need to send array elements from Google cloud function to CX Bot, as Custom payload chips response. i.e One chip per array element should be shown in the CX Bot.
The length of the array is not fixed and varies. Please suggest how can I achieve this.
I am able to send when I use something like arr[0] , or arr[1], but here the case is the length of the array is not fixed but varies.

Related

Dialogueflow CX webhook validation

Good-day
I am using Dialogue Flow CX to create a bot.
One parameter that I am collecting needs to be validated against a series of functions and therefore I will need to use the web hook functionality.
If the value is incorrect I would like to re-prompt , doing this about 3 times before I move the user on. This is very much like using no-match 1,2,3 etc.
What I cant seem to find is any documentation on how to do this.
Is there a way to send back JSON response with a no-match?
Any help would be greatly appreciated

Dialogflow CX return partial response

I have a Dialogflow CX V3 chatbot built with the Google Dialogflow console. I send it text chat using the REST API.
const response = await sessionsClient.detectIntent(request);
And that works fine. But some routes in my Dialogflow agent have to call out to a webhook that may take time to respond. I want to use the Return Partial Response feature to present a message to the user before the webhook is called. It doesn't make sense for that to use the REST API, because that only has the sessionsClient.detectIntent call, and that waits until the whole fulfillment is over before returning. It does have the option to return a PARTIAL result but that never seems to happen, and I cannot see how I might obtain any final result after a partial one.
I went to the RPC API which supports long running operations, hoping to find a variant of detectIntent that returns an operation so I can query the operation multiple times. But I only found
rpc DetectIntent(DetectIntentRequest) returns (DetectIntentResponse)
and DetectIntentResponse is not an operation. Again, it includes a flag responseType which may take the value PARTIAL. However, if I see a partial response, I'm at a loss as to how to get any further output from my API call.
rpc streamingDetectIntent returns a response which can come in multiple pieces. But that seems only applicable to audio chat.
Can anyone please tell me how to use Return Partial Response with a text-based Dialogflow CX chatbot, please?

How to use Language Generation to handle multiple Activities at once in Bot Framework V4

I am trying to create a Language Generation Template where a single response template should be able to send multiple message bubbles in Chat.
For Eg.
Language Generation in Bot Framework allows us to create the below format response:
# R1
[Activity
Text = Basic Test Response
]
But this whill send a single message bubble into chat.
I am trying to create a template which can send two messages into chat using a single Language Generation template.
Any inputs are appreciated which can help me in achieving this.
Thanks in Advance
You won't be able to do this. Each bubble is it's own activity. You can send one activity/message (one bubble) that has line breaks within it, so that each bit of text is separate. But to have separate bubbles, you will need to just send back to back messages (Send a response).

How to send int value through SSE when the value changes...(Spring Boot)

I've implemented an upload/update items via CSV for my website. I've also added a simple AtomicInteger to track the percentage of the task that has been completed. Now I want to give the front-end an option to subscribe to a stream in order to automatically receive the percentage without having to make a request.
I've found out that there is such a thing as SSE(Server Side Event) emitters. However, so far, my research hasn't shown me a simple way to send the integer value when it changes.
Most of the examples are concerning some custom objects and forceful delayed creations of those objects using Flux intervals.
Can someone help out? All I need is for the REST API to have an endpoint that will automatically send a certain integer when the value of that integer changes.

Multiple data elements in single Parse Push RETS API request

I was wondering if here is a way to send multiple 'data' elements in a single Parse REST API push request. I know we can send the same message to multiple devices or channels as required. But i have a different message for each channel. So what i need is a way to call Parse REST API once with the JSON of different channels but each with a different data and alert message.
is is possible? or do i need to make such requests one by one.

Resources