Skip to content

Commit

Permalink
feat: add advanced settings for agent level
Browse files Browse the repository at this point in the history
feat: add rollout config, state and failure reason for experiment
feat: add insights export settings for security setting
feat: add language code for streaming recognition result and flow versions for query parameters
docs: deprecate legacy logging settings

PiperOrigin-RevId: 387851191
  • Loading branch information
Google APIs authored and Copybara-Service committed Jul 30, 2021
1 parent b50902f commit 5af6d9b
Show file tree
Hide file tree
Showing 11 changed files with 170 additions and 6 deletions.
1 change: 1 addition & 0 deletions google/cloud/dialogflow/cx/v3beta1/BUILD.bazel
Expand Up @@ -21,6 +21,7 @@ load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
proto_library(
name = "cx_proto",
srcs = [
"advanced_settings.proto",
"agent.proto",
"audio_config.proto",
"entity_type.proto",
Expand Down
52 changes: 52 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto
@@ -0,0 +1,52 @@
// Copyright 2021 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";
import "google/protobuf/duration.proto";
import "google/api/annotations.proto";

option cc_enable_arenas = true;
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3beta1;cx";
option java_multiple_files = true;
option java_outer_classname = "AdvancedSettingsProto";
option java_package = "com.google.cloud.dialogflow.cx.v3beta1";
option objc_class_prefix = "DF";

// Hierarchical advanced settings for agent/flow/page/fulfillment/parameter.
// Settings exposed at lower level overrides the settings exposed at higher
// level.
//
// Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
message AdvancedSettings {
// Define behaviors on logging.
message LoggingSettings {
// If true, StackDriver logging is currently enabled.
bool enable_stackdriver_logging = 2;

// If true, DF Interaction logging is currently enabled.
bool enable_interaction_logging = 3;
}

// Settings for logging.
// Settings for Dialogflow History, Contact Center messages, StackDriver logs,
// and speech logging.
// Exposed at the following levels:
// - Agent level.
LoggingSettings logging_settings = 6;
}
9 changes: 8 additions & 1 deletion google/cloud/dialogflow/cx/v3beta1/agent.proto
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/flow.proto";
import "google/cloud/dialogflow/cx/v3beta1/security_settings.proto";
import "google/longrunning/operations.proto";
Expand Down Expand Up @@ -223,11 +224,17 @@ message Agent {
}];

// Indicates if stackdriver logging is enabled for the agent.

This comment has been minimized.

Copy link
@JStr84galaxy

JStr84galaxy Aug 2, 2021

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

bool enable_stackdriver_logging = 18;
// Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3beta1.AdvancedSettings.LoggingSettings]
// instead.
bool enable_stackdriver_logging = 18 [deprecated = true];

// Indicates if automatic spell correction is enabled in detect intent
// requests.
bool enable_spell_correction = 20;

// Hierarchical advanced settings for this agent. The settings exposed at the
// lower level overrides the settings exposed at the higher level.
AdvancedSettings advanced_settings = 22;
}

// The request message for [Agents.ListAgents][google.cloud.dialogflow.cx.v3beta1.Agents.ListAgents].
Expand Down
70 changes: 67 additions & 3 deletions google/cloud/dialogflow/cx/v3beta1/experiment.proto
Expand Up @@ -246,6 +246,9 @@ message Experiment {

// The experiment is done.
DONE = 3;

// The experiment with auto-rollout enabled has failed.
ROLLOUT_FAILED = 4;
}

// The name of the experiment.
Expand All @@ -261,14 +264,28 @@ message Experiment {
string description = 3;

// The current state of the experiment.
// Transition triggered by Expriments.StartExperiment: PENDING->RUNNING.
// Transition triggered by Expriments.CancelExperiment: PENDING->CANCELLED or
// RUNNING->CANCELLED.
// Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING.
// Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or
// RUNNING->DONE.
State state = 4;

// The definition of the experiment.
Definition definition = 5;

// The configuration for auto rollout. If set, there should be exactly two
// variants in the experiment (control variant being the default version of
// the flow), the traffic allocation for the non-control variant will
// gradually increase to 100% when conditions are met, and eventually
// replace the control variant to become the default version of the flow.
RolloutConfig rollout_config = 14;

// State of the auto rollout process.
RolloutState rollout_state = 15;

// The reason why rollout has failed. Should only be set when state is
// ROLLOUT_FAILED.
string rollout_failure_reason = 16;

// Inference result of the experiment.
Result result = 6;

Expand Down Expand Up @@ -314,6 +331,53 @@ message VersionVariants {
repeated Variant variants = 1;
}

// The configuration for auto rollout.
message RolloutConfig {
// A single rollout step with specified traffic allocation.
message RolloutStep {
// The name of the rollout step;
string display_name = 1;

// The percentage of traffic allocated to the flow version of this rollout
// step. (0%, 100%].
int32 traffic_percent = 2;

// The minimum time that this step should last. Should be longer than 1
// hour. If not set, the default minimum duration for each step will be 1
// hour.
google.protobuf.Duration min_duration = 3;
}

// Steps to roll out a flow version. Steps should be sorted by percentage in
// ascending order.
repeated RolloutStep rollout_steps = 1;

// The conditions that are used to evaluate the success of a rollout
// step. If not specified, all rollout steps will proceed to the next one
// unless failure conditions are met. E.g. "containment_rate > 60% AND
// callback_rate < 20%". See the [conditions
// reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
string rollout_condition = 2;

// The conditions that are used to evaluate the failure of a rollout
// step. If not specified, no rollout steps will fail. E.g. "containment_rate
// < 10% OR average_turn_count < 3". See the [conditions
// reference](https://cloud.google.com/dialogflow/cx/docs/reference/condition).
string failure_condition = 3;
}

// State of the auto-rollout process.
message RolloutState {
// Display name of the current auto rollout step.
string step = 1;

// Index of the current step in the auto rollout steps list.
int32 step_index = 3;

// Start time of the current step.
google.protobuf.Timestamp start_time = 2;
}

// The history of variants update.
message VariantsHistory {
// The variants updated. We currently only support single variant
Expand Down
1 change: 1 addition & 0 deletions google/cloud/dialogflow/cx/v3beta1/flow.proto
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/page.proto";
import "google/cloud/dialogflow/cx/v3beta1/validation_message.proto";
import "google/longrunning/operations.proto";
Expand Down
1 change: 1 addition & 0 deletions google/cloud/dialogflow/cx/v3beta1/fulfillment.proto
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";
import "google/api/annotations.proto";
Expand Down
1 change: 1 addition & 0 deletions google/cloud/dialogflow/cx/v3beta1/intent.proto
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/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/protobuf/timestamp.proto";
Expand Down
1 change: 1 addition & 0 deletions google/cloud/dialogflow/cx/v3beta1/page.proto
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/fulfillment.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
Expand Down
19 changes: 17 additions & 2 deletions google/cloud/dialogflow/cx/v3beta1/security_settings.proto
Expand Up @@ -173,6 +173,14 @@ message SecuritySettings {
pattern: "projects/{project}/locations/{location}/securitySettings/{security_settings}"
};

// Settings for exporting conversations to
// [Insights](https://cloud.google.com/dialogflow/priv/docs/insights).
message InsightsExportSettings {
// If enabled, we will automatically exports
// conversations to Insights and Insights runs its analyzers.
bool enable_insights_export = 1;
}

// Defines how we redact data.
enum RedactionStrategy {
// Do not redact.
Expand Down Expand Up @@ -220,8 +228,8 @@ message SecuritySettings {
// logging.
RedactionScope redaction_scope = 4;

// DLP inspect template name. Use this template to define inspect base
// settings.
// [DLP](https://cloud.google.com/dlp/docs) inspect template name. Use this
// template to define inspect base settings.
//
// If empty, we use the default DLP inspect config.
//
Expand Down Expand Up @@ -250,4 +258,11 @@ message SecuritySettings {

// List of types of data to remove when retention settings triggers purge.
repeated PurgeDataType purge_data_types = 8;

// Optional. Controls conversation exporting settings to Insights after conversation is
// completed.
//
// If [retention_strategy][google.cloud.dialogflow.cx.v3beta1.SecuritySettings.retention_strategy] is set to REMOVE_AFTER_CONVERSATION,
// Insights export is disabled no matter what you configure here.
InsightsExportSettings insights_export_settings = 13 [(google.api.field_behavior) = OPTIONAL];
}
16 changes: 16 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/session.proto
Expand Up @@ -19,6 +19,7 @@ package google.cloud.dialogflow.cx.v3beta1;
import "google/api/annotations.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/audio_config.proto";
import "google/cloud/dialogflow/cx/v3beta1/flow.proto";
import "google/cloud/dialogflow/cx/v3beta1/intent.proto";
Expand Down Expand Up @@ -378,6 +379,9 @@ message StreamingRecognitionResult {
// beginning of the audio. Only populated for `message_type` =
// `TRANSCRIPT`.
google.protobuf.Duration speech_end_offset = 8;

// Detected language code for the transcript.
string language_code = 10;
}

// Represents the parameters of a conversational query.
Expand Down Expand Up @@ -467,6 +471,18 @@ message QueryParameters {
// "Content-Length", "Connection", "From", "User-Agent", "Accept-Encoding",
// "If-Modified-Since", "If-None-Match", "X-Forwarded-For", etc.
map<string, string> webhook_headers = 10;

// A list of flow versions to override for the request.
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
// ID>/flows/<Flow ID>/versions/<Version ID>`.
//
// If version 1 of flow X is included in this list, the traffic of
// flow X will go through version 1 regardless of the version configuration in
// the environment. Each flow can have at most one version specified in this
// list.
repeated string flow_versions = 14 [(google.api.resource_reference) = {
type: "dialogflow.googleapis.com/Version"
}];
}

// Represents the query input. It can contain one of:
Expand Down
5 changes: 5 additions & 0 deletions google/cloud/dialogflow/cx/v3beta1/version.proto
Expand Up @@ -20,7 +20,12 @@ 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/entity_type.proto";
import "google/cloud/dialogflow/cx/v3beta1/flow.proto";
import "google/cloud/dialogflow/cx/v3beta1/intent.proto";
import "google/cloud/dialogflow/cx/v3beta1/page.proto";
import "google/cloud/dialogflow/cx/v3beta1/transition_route_group.proto";
import "google/cloud/dialogflow/cx/v3beta1/webhook.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
Expand Down

0 comments on commit 5af6d9b

Please sign in to comment.