@@ -147,6 +147,20 @@ message DetectIntentRequest {
147
147
148
148
// The message returned from the DetectIntent method.
149
149
message DetectIntentResponse {
150
+ // Represents different DetectIntentResponse types.
151
+ enum ResponseType {
152
+ // Not specified. This should never happen.
153
+ RESPONSE_TYPE_UNSPECIFIED = 0 ;
154
+
155
+ // Partial response. e.g. Aggregated responses in a Fulfillment that enables
156
+ // `return_partial_response` can be returned as partial response.
157
+ // WARNING: partial response is not eligible for barge-in.
158
+ PARTIAL = 1 ;
159
+
160
+ // Final response.
161
+ FINAL = 2 ;
162
+ }
163
+
150
164
// Output only. The unique identifier of the response. It can be used to
151
165
// locate a response in the training example set or for reporting issues.
152
166
string response_id = 1 ;
@@ -169,6 +183,14 @@ message DetectIntentResponse {
169
183
170
184
// The config used by the speech synthesizer to generate the output audio.
171
185
OutputAudioConfig output_audio_config = 5 ;
186
+
187
+ // Response type.
188
+ ResponseType response_type = 6 ;
189
+
190
+ // Indicates whether the partial response can be cancelled when a later
191
+ // response arrives. e.g. if the agent specified some music as partial
192
+ // response, it can be cancelled.
193
+ bool allow_cancellation = 7 ;
172
194
}
173
195
174
196
// The top-level message sent by the client to the
@@ -229,6 +251,12 @@ message StreamingDetectIntentRequest {
229
251
230
252
// Instructs the speech synthesizer how to generate the output audio.
231
253
OutputAudioConfig output_audio_config = 4 ;
254
+
255
+ // Enable partial detect intent response. If this flag is not enabled,
256
+ // response stream still contains only one final `DetectIntentResponse` even
257
+ // if some `Fulfillment`s in the agent have been configured to return partial
258
+ // responses.
259
+ bool enable_partial_response = 5 ;
232
260
}
233
261
234
262
// The top-level message returned from the `StreamingDetectIntent` method.
@@ -408,8 +436,9 @@ message QueryParameters {
408
436
google.protobuf.Struct parameters = 5 ;
409
437
410
438
// The unique identifier of the [page][google.cloud.dialogflow.cx.v3.Page] to override the [current
411
- // page][QueryResult.current_page] in the session. Format: `projects/<Project
412
- // ID>/locations/<Location ID>/agents/<Agent ID>/pages/<page ID>`.
439
+ // page][QueryResult.current_page] in the session.
440
+ // Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
441
+ // ID>/flows/<Flow ID>/pages/<Page ID>`.
413
442
//
414
443
// If `current_page` is specified, the previous state of the session will be
415
444
// ignored by Dialogflow, including the [previous
0 commit comments