@@ -147,6 +147,20 @@ message DetectIntentRequest {
147147
148148// The message returned from the DetectIntent method.
149149message 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+
150164 // Output only. The unique identifier of the response. It can be used to
151165 // locate a response in the training example set or for reporting issues.
152166 string response_id = 1 ;
@@ -169,6 +183,14 @@ message DetectIntentResponse {
169183
170184 // The config used by the speech synthesizer to generate the output audio.
171185 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 ;
172194}
173195
174196// The top-level message sent by the client to the
@@ -229,6 +251,12 @@ message StreamingDetectIntentRequest {
229251
230252 // Instructs the speech synthesizer how to generate the output audio.
231253 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 ;
232260}
233261
234262// The top-level message returned from the `StreamingDetectIntent` method.
@@ -408,8 +436,9 @@ message QueryParameters {
408436 google.protobuf.Struct parameters = 5 ;
409437
410438 // 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>`.
413442 //
414443 // If `current_page` is specified, the previous state of the session will be
415444 // ignored by Dialogflow, including the [previous
0 commit comments