Skip to content

Commit

Permalink
feat: add support for AdvancedSettings
Browse files Browse the repository at this point in the history
feat: add Intent import/export APIs
feat: add Inline destination
chore: remove the extraneous backend config

PiperOrigin-RevId: 569217741
  • Loading branch information
Google APIs authored and Copybara-Service committed Sep 28, 2023
1 parent 96ded9f commit f91419c
Show file tree
Hide file tree
Showing 9 changed files with 329 additions and 56 deletions.
2 changes: 1 addition & 1 deletion google/cloud/dialogflow/cx/v3beta1/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ proto_library(
"gcs.proto",
"generative_settings.proto",
"import_strategy.proto",
"inline.proto",
"intent.proto",
"page.proto",
"response_message.proto",
Expand Down Expand Up @@ -402,7 +403,6 @@ load(

csharp_proto_library(
name = "cx_csharp_proto",
extra_opts = [],
deps = [":cx_proto"],
)

Expand Down
25 changes: 25 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,23 @@ option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1";
//
// Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
message AdvancedSettings {
// Define behaviors for DTMF (dual tone multi frequency).
message DtmfSettings {
// If true, incoming audio is processed for DTMF (dual tone multi frequency)
// events. For example, if the caller presses a button on their telephone
// keypad and DTMF processing is enabled, Dialogflow will detect the
// event (e.g. a "3" was pressed) in the incoming audio and pass the event
// to the bot to drive business logic (e.g. when 3 is pressed, return the
// account balance).
bool enabled = 1;

// Max length of DTMF digits.
int32 max_digits = 2;

// The digit that terminates a DTMF digit sequence.
string finish_digit = 3;
}

// Define behaviors on logging.
message LoggingSettings {
// If true, StackDriver logging is currently enabled.
Expand All @@ -56,6 +73,14 @@ message AdvancedSettings {
// - Flow level
GcsDestination audio_export_gcs_destination = 2;

// Settings for DTMF.
// Exposed at the following levels:
// - Agent level
// - Flow level
// - Page level
// - Parameter level.
DtmfSettings dtmf_settings = 5;

// Settings for logging.
// Settings for Dialogflow History, Contact Center messages, StackDriver logs,
// and speech logging.
Expand Down
59 changes: 4 additions & 55 deletions google/cloud/dialogflow/cx/v3beta1/dialogflow_v3beta1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ types:
- name: google.cloud.dialogflow.cx.v3beta1.DeployFlowResponse
- name: google.cloud.dialogflow.cx.v3beta1.ExportAgentResponse
- name: google.cloud.dialogflow.cx.v3beta1.ExportFlowResponse
- name: google.cloud.dialogflow.cx.v3beta1.ExportIntentsMetadata
- name: google.cloud.dialogflow.cx.v3beta1.ExportIntentsResponse
- name: google.cloud.dialogflow.cx.v3beta1.ExportTestCasesMetadata
- name: google.cloud.dialogflow.cx.v3beta1.ExportTestCasesResponse
- name: google.cloud.dialogflow.cx.v3beta1.ImportFlowResponse
- name: google.cloud.dialogflow.cx.v3beta1.ImportIntentsMetadata
- name: google.cloud.dialogflow.cx.v3beta1.ImportIntentsResponse
- name: google.cloud.dialogflow.cx.v3beta1.ImportTestCasesMetadata
- name: google.cloud.dialogflow.cx.v3beta1.ImportTestCasesResponse
- name: google.cloud.dialogflow.cx.v3beta1.RunContinuousTestMetadata
Expand Down Expand Up @@ -70,61 +74,6 @@ documentation:
- selector: google.cloud.location.Locations.ListLocations
description: Lists information about the supported locations for this service.

backend:
rules:
- selector: 'google.cloud.dialogflow.cx.v3beta1.Agents.*'
deadline: 60.0
- selector: google.cloud.dialogflow.cx.v3beta1.Agents.CreateAgent
deadline: 180.0
- selector: google.cloud.dialogflow.cx.v3beta1.Changelogs.GetChangelog
deadline: 60.0
- selector: google.cloud.dialogflow.cx.v3beta1.Changelogs.ListChangelogs
deadline: 60.0
- selector: google.cloud.dialogflow.cx.v3beta1.Deployments.GetDeployment
deadline: 60.0
- selector: google.cloud.dialogflow.cx.v3beta1.Deployments.ListDeployments
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.EntityTypes.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.Environments.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.Experiments.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.Flows.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.Intents.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.Pages.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.SecuritySettingsService.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.SessionEntityTypes.*'
deadline: 60.0
- selector: google.cloud.dialogflow.cx.v3beta1.Sessions.DetectIntent
deadline: 220.0
- selector: google.cloud.dialogflow.cx.v3beta1.Sessions.FulfillIntent
deadline: 60.0
- selector: google.cloud.dialogflow.cx.v3beta1.Sessions.MatchIntent
deadline: 60.0
- selector: google.cloud.dialogflow.cx.v3beta1.Sessions.StreamingDetectIntent
deadline: 220.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.TestCases.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.TransitionRouteGroups.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.Versions.*'
deadline: 60.0
- selector: 'google.cloud.dialogflow.cx.v3beta1.Webhooks.*'
deadline: 60.0
- selector: google.cloud.location.Locations.GetLocation
deadline: 60.0
- selector: google.cloud.location.Locations.ListLocations
deadline: 60.0
- selector: 'google.longrunning.Operations.*'
deadline: 60.0
- selector: google.longrunning.Operations.ListOperations
deadline: 180.0

http:
rules:
- selector: google.cloud.location.Locations.GetLocation
Expand Down
5 changes: 5 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/flow.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import "google/api/annotations.proto";
import "google/api/client.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto";
import "google/cloud/dialogflow/cx/v3beta1/import_strategy.proto";
import "google/cloud/dialogflow/cx/v3beta1/page.proto";
import "google/cloud/dialogflow/cx/v3beta1/validation_message.proto";
Expand Down Expand Up @@ -321,6 +322,10 @@ message Flow {
// NLU related settings of the flow.
NluSettings nlu_settings = 11;

// Hierarchical advanced settings for this flow. The settings exposed at the
// lower level overrides the settings exposed at the higher level.
AdvancedSettings advanced_settings = 14;

// Optional. Knowledge connector configuration.
KnowledgeConnectorSettings knowledge_connector_settings = 18
[(google.api.field_behavior) = OPTIONAL];
Expand Down
12 changes: 12 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/fulfillment.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ syntax = "proto3";
package google.cloud.dialogflow.cx.v3beta1;

import "google/api/resource.proto";
import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto";
import "google/cloud/dialogflow/cx/v3beta1/response_message.proto";
import "google/protobuf/struct.proto";

Expand Down Expand Up @@ -126,4 +127,15 @@ message Fulfillment {

// Conditional cases for this fulfillment.
repeated ConditionalCases conditional_cases = 5;

// Hierarchical advanced settings for this fulfillment. The settings exposed
// at the lower level overrides the settings exposed at the higher level.
AdvancedSettings advanced_settings = 7;

// If the flag is true, the agent will utilize LLM to generate a text
// response. If LLM generation fails, the defined
// [responses][google.cloud.dialogflow.cx.v3beta1.Fulfillment.messages] in the
// fulfillment will be respected. This flag is only useful for fulfillments
// associated with no-match event handlers.
bool enable_generative_fallback = 12;
}
44 changes: 44 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/inline.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// Copyright 2023 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.dialogflow.cx.v3beta1;

import "google/api/field_behavior.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
option go_package = "cloud.google.com/go/dialogflow/cx/apiv3beta1/cxpb;cxpb";
option java_multiple_files = true;
option java_outer_classname = "InlineProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";
option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1";

// Inline destination for a Dialogflow operation that writes or exports objects
// (e.g. [intents][google.cloud.dialogflow.cx.v3beta1.Intent]) outside of
// Dialogflow.
message InlineDestination {
// Output only. The uncompressed byte content for the objects.
// Only populated in responses.
bytes content = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
}

// Inline source for a Dialogflow operation that reads or imports objects
// (e.g. [intents][google.cloud.dialogflow.cx.v3beta1.Intent]) into Dialogflow.
message InlineSource {
// The uncompressed byte content for the objects.
bytes content = 1;
}

0 comments on commit f91419c

Please sign in to comment.