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

feat: add advanced settings for agent level 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 p... #156

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions protos/google/cloud/dialogflow/cx/v3/advanced_settings.proto
Original file line number Diff line number Diff line change
@@ -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.v3;

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.V3";
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/cx/v3;cx";
option java_multiple_files = true;
option java_outer_classname = "AdvancedSettingsProto";
option java_package = "com.google.cloud.dialogflow.cx.v3";
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 protos/google/cloud/dialogflow/cx/v3/agent.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/v3/advanced_settings.proto";
import "google/cloud/dialogflow/cx/v3/flow.proto";
import "google/cloud/dialogflow/cx/v3/security_settings.proto";
import "google/longrunning/operations.proto";
Expand Down Expand Up @@ -224,11 +225,17 @@ message Agent {
}];

// Indicates if stackdriver logging is enabled for the agent.
bool enable_stackdriver_logging = 18;
// Please use [agent.advanced_settings][google.cloud.dialogflow.cx.v3.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.v3.Agents.ListAgents].
Expand Down
50 changes: 25 additions & 25 deletions protos/google/cloud/dialogflow/cx/v3/audio_config.proto
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,31 @@ option java_outer_classname = "AudioConfigProto";
option java_package = "com.google.cloud.dialogflow.cx.v3";
option objc_class_prefix = "DF";

// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
string word = 3;

// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
google.protobuf.Duration start_offset = 1;

// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
google.protobuf.Duration end_offset = 2;

// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
float confidence = 4;
}

// Audio encoding of the audio content sent in the conversational query request.
// Refer to the
// [Cloud Speech API
Expand Down Expand Up @@ -78,31 +103,6 @@ enum AudioEncoding {
AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE = 7;
}

// Information for a word recognized by the speech recognizer.
message SpeechWordInfo {
// The word this info is for.
string word = 3;

// Time offset relative to the beginning of the audio that corresponds to the
// start of the spoken word. This is an experimental feature and the accuracy
// of the time offset can vary.
google.protobuf.Duration start_offset = 1;

// Time offset relative to the beginning of the audio that corresponds to the
// end of the spoken word. This is an experimental feature and the accuracy of
// the time offset can vary.
google.protobuf.Duration end_offset = 2;

// The Speech confidence between 0.0 and 1.0 for this word. A higher number
// indicates an estimated greater likelihood that the recognized word is
// correct. The default of 0.0 is a sentinel value indicating that confidence
// was not set.
//
// This field is not guaranteed to be fully stable over time for the same
// audio input. Users should also not rely on it to always be provided.
float confidence = 4;
}

// Instructs the speech recognizer on how to process the audio content.
message InputAudioConfig {
// Required. Audio encoding of the audio content to process.
Expand Down
70 changes: 67 additions & 3 deletions protos/google/cloud/dialogflow/cx/v3/experiment.proto
Original file line number Diff line number Diff line change
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 @@ -327,6 +344,53 @@ message VariantsHistory {
google.protobuf.Timestamp update_time = 2;
}

// 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 request message for [Experiments.ListExperiments][google.cloud.dialogflow.cx.v3.Experiments.ListExperiments].
message ListExperimentsRequest {
// Required. The [Environment][google.cloud.dialogflow.cx.v3.Environment] to list all environments for.
Expand Down
1 change: 1 addition & 0 deletions protos/google/cloud/dialogflow/cx/v3/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/v3/advanced_settings.proto";
import "google/cloud/dialogflow/cx/v3/page.proto";
import "google/cloud/dialogflow/cx/v3/validation_message.proto";
import "google/longrunning/operations.proto";
Expand Down
1 change: 1 addition & 0 deletions protos/google/cloud/dialogflow/cx/v3/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.v3;

import "google/api/resource.proto";
import "google/cloud/dialogflow/cx/v3/advanced_settings.proto";
import "google/cloud/dialogflow/cx/v3/response_message.proto";
import "google/protobuf/struct.proto";
import "google/api/annotations.proto";
Expand Down
1 change: 1 addition & 0 deletions protos/google/cloud/dialogflow/cx/v3/intent.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/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 protos/google/cloud/dialogflow/cx/v3/page.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/v3/advanced_settings.proto";
import "google/cloud/dialogflow/cx/v3/fulfillment.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
Expand Down
19 changes: 17 additions & 2 deletions protos/google/cloud/dialogflow/cx/v3/security_settings.proto
Original file line number Diff line number Diff line change
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.v3.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 protos/google/cloud/dialogflow/cx/v3/session.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package google.cloud.dialogflow.cx.v3;
import "google/api/annotations.proto";
import "google/api/field_behavior.proto";
import "google/api/resource.proto";
import "google/cloud/dialogflow/cx/v3/advanced_settings.proto";
import "google/cloud/dialogflow/cx/v3/audio_config.proto";
import "google/cloud/dialogflow/cx/v3/flow.proto";
import "google/cloud/dialogflow/cx/v3/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 protos/google/cloud/dialogflow/cx/v3/version.proto
Original file line number Diff line number Diff line change
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/v3/entity_type.proto";
import "google/cloud/dialogflow/cx/v3/flow.proto";
import "google/cloud/dialogflow/cx/v3/intent.proto";
import "google/cloud/dialogflow/cx/v3/page.proto";
import "google/cloud/dialogflow/cx/v3/transition_route_group.proto";
import "google/cloud/dialogflow/cx/v3/webhook.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
Expand Down
Loading