Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

Commit

Permalink
fix(v3beta1): set agent default language code as required (#134)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 378978212

Source-Link: googleapis/googleapis@ecc3ac6

Source-Link: googleapis/googleapis-gen@398a922

feat(v3beta1): Support partial response feature
docs: Update docs of Agents, Fulfillments, SecuritySettings and Sessions
  • Loading branch information
gcf-owl-bot[bot] committed Jun 17, 2021
1 parent 2c45b2c commit ee8a24a
Show file tree
Hide file tree
Showing 7 changed files with 232 additions and 6 deletions.
7 changes: 5 additions & 2 deletions protos/google/cloud/dialogflow/cx/v3beta1/agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,15 @@ message Agent {
// Required. The human-readable name of the agent, unique within the location.
string display_name = 2 [(google.api.field_behavior) = REQUIRED];

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

// The list of all languages supported by the agent (except for the
// `default_language_code`).
Expand Down
11 changes: 11 additions & 0 deletions protos/google/cloud/dialogflow/cx/v3beta1/fulfillment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,17 @@ message Fulfillment {
type: "dialogflow.googleapis.com/Webhook"
}];

// Whether Dialogflow should return currently queued fulfillment response
// messages in streaming APIs. If a webhook is specified, it happens before
// Dialogflow invokes webhook.
// Warning:
// 1) This flag only affects streaming API. Responses are still queued
// and returned once in non-streaming API.
// 2) The flag can be enabled in any fulfillment but only the first 3 partial
// responses will be returned. You may only want to apply it to fulfillments
// that have slow webhooks.
bool return_partial_responses = 8;

// The tag used by the webhook to identify which fulfillment is being called.
// This field is required if `webhook` is specified.
string tag = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ message SecuritySettings {
// If empty, we use the default DLP inspect config.
//
// The template name will have one of the following formats:
// `projects/PROJECT_ID/inspectTemplates/TEMPLATE_ID` OR
// `organizations/ORGANIZATION_ID/inspectTemplates/TEMPLATE_ID`
// `projects/<Project ID>/inspectTemplates/<Template ID>` OR
// `projects/<Project ID>/locations/<Location ID>/inspectTemplates/<Template
// ID>` OR
// `organizations/<Organization ID>/inspectTemplates/<Template ID>`
string inspect_template = 9;

// Specifies how data is retained. Note that even if the data is
Expand Down
33 changes: 31 additions & 2 deletions protos/google/cloud/dialogflow/cx/v3beta1/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,20 @@ message DetectIntentRequest {

// The message returned from the DetectIntent method.
message DetectIntentResponse {
// Represents different DetectIntentResponse types.
enum ResponseType {
// Not specified. This should never happen.
RESPONSE_TYPE_UNSPECIFIED = 0;

// Partial response. e.g. Aggregated responses in a Fulfillment that enables
// `return_partial_response` can be returned as partial response.
// WARNING: partial response is not eligible for barge-in.
PARTIAL = 1;

// Final response.
FINAL = 2;
}

// Output only. The unique identifier of the response. It can be used to
// locate a response in the training example set or for reporting issues.
string response_id = 1;
Expand All @@ -169,6 +183,14 @@ message DetectIntentResponse {

// The config used by the speech synthesizer to generate the output audio.
OutputAudioConfig output_audio_config = 5;

// Response type.
ResponseType response_type = 6;

// Indicates whether the partial response can be cancelled when a later
// response arrives. e.g. if the agent specified some music as partial
// response, it can be cancelled.
bool allow_cancellation = 7;
}

// The top-level message sent by the client to the
Expand Down Expand Up @@ -229,6 +251,12 @@ message StreamingDetectIntentRequest {

// Instructs the speech synthesizer how to generate the output audio.
OutputAudioConfig output_audio_config = 4;

// Enable partial detect intent response. If this flag is not enabled,
// response stream still contains only one final `DetectIntentResponse` even
// if some `Fulfillment`s in the agent have been configured to return partial
// responses.
bool enable_partial_response = 5;
}

// The top-level message returned from the `StreamingDetectIntent` method.
Expand Down Expand Up @@ -408,8 +436,9 @@ message QueryParameters {
google.protobuf.Struct parameters = 5;

// The unique identifier of the [page][google.cloud.dialogflow.cx.v3beta1.Page] to override the [current
// page][QueryResult.current_page] in the session. Format: `projects/<Project
// ID>/locations/<Location ID>/agents/<Agent ID>/pages/<page ID>`.
// page][QueryResult.current_page] in the session.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/pages/<Page ID>`.
//
// If `current_page` is specified, the previous state of the session will be
// ignored by Dialogflow, including the [previous
Expand Down
34 changes: 34 additions & 0 deletions protos/protos.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ee8a24a

Please sign in to comment.