Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ecc3ac6

Browse files
Google APIscopybara-github
authored andcommitted
fix!: Set agent default language code as required.
feat: Support partial response feature. docs: Update docs of Agents, Fulfillments, SecuritySettings and Sessions. PiperOrigin-RevId: 378978212
1 parent f0ff5f0 commit ecc3ac6

File tree

4 files changed

+51
-6
lines changed

4 files changed

+51
-6
lines changed

google/cloud/dialogflow/cx/v3beta1/agent.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,12 +159,15 @@ message Agent {
159159
// Required. The human-readable name of the agent, unique within the location.
160160
string display_name = 2 [(google.api.field_behavior) = REQUIRED];
161161

162-
// Immutable. The default language of the agent as a language tag.
162+
// Required. Immutable. The default language of the agent as a language tag.
163163
// See [Language
164164
// Support](https://cloud.google.com/dialogflow/cx/docs/reference/language)
165165
// for a list of the currently supported language codes.
166166
// This field cannot be set by the [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3beta1.Agents.UpdateAgent] method.
167-
string default_language_code = 3 [(google.api.field_behavior) = IMMUTABLE];
167+
string default_language_code = 3 [
168+
(google.api.field_behavior) = REQUIRED,
169+
(google.api.field_behavior) = IMMUTABLE
170+
];
168171

169172
// The list of all languages supported by the agent (except for the
170173
// `default_language_code`).

google/cloud/dialogflow/cx/v3beta1/fulfillment.proto

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,17 @@ message Fulfillment {
9595
type: "dialogflow.googleapis.com/Webhook"
9696
}];
9797

98+
// Whether Dialogflow should return currently queued fulfillment response
99+
// messages in streaming APIs. If a webhook is specified, it happens before
100+
// Dialogflow invokes webhook.
101+
// Warning:
102+
// 1) This flag only affects streaming API. Responses are still queued
103+
// and returned once in non-streaming API.
104+
// 2) The flag can be enabled in any fulfillment but only the first 3 partial
105+
// responses will be returned. You may only want to apply it to fulfillments
106+
// that have slow webhooks.
107+
bool return_partial_responses = 8;
108+
98109
// The tag used by the webhook to identify which fulfillment is being called.
99110
// This field is required if `webhook` is specified.
100111
string tag = 3;

google/cloud/dialogflow/cx/v3beta1/security_settings.proto

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ message SecuritySettings {
226226
// If empty, we use the default DLP inspect config.
227227
//
228228
// The template name will have one of the following formats:
229-
// `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
230-
// `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
229+
// `projects/<Project ID>/inspectTemplates/<Template ID>` OR
230+
// `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
231+
// ID>` OR
232+
// `organizations/<Organization ID>/inspectTemplates/<Template ID>`
231233
string inspect_template = 9;
232234

233235
// Specifies how data is retained. Note that even if the data is

google/cloud/dialogflow/cx/v3beta1/session.proto

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,20 @@ message DetectIntentRequest {
147147

148148
// The message returned from the DetectIntent method.
149149
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+
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.v3beta1.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

Comments
 (0)