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

Skip to content

Commit d44c300

Browse files
Google APIscopybara-github
authored andcommitted
feat: exposed DataStoreConnectionSignals
feat: added support for lock flow feat: added support for multi language settings in flow feat: added support for service directory in tools feat: added support for oauth and service agent auth for webhook. feat: expose store tts option in security settings feat: expose PersonalizationSettings & SpeechSettings in v3 API. docs: clarified wording around enable_stackdriver_logging & enable_interaction_logging docs: clarified wording around start point of test config. docs: clarified wording around audio redaction PiperOrigin-RevId: 654775620
1 parent 556515b commit d44c300

File tree

8 files changed

+381
-10
lines changed

8 files changed

+381
-10
lines changed

google/cloud/dialogflow/cx/v3/advanced_settings.proto

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package google.cloud.dialogflow.cx.v3;
1818

1919
import "google/api/field_behavior.proto";
2020
import "google/cloud/dialogflow/cx/v3/gcs.proto";
21+
import "google/protobuf/duration.proto";
2122

2223
option cc_enable_arenas = true;
2324
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
@@ -40,6 +41,27 @@ option ruby_package = "Google::Cloud::Dialogflow::CX::V3";
4041
//
4142
// Hierarchy: Agent->Flow->Page->Fulfillment/Parameter.
4243
message AdvancedSettings {
44+
// Define behaviors of speech to text detection.
45+
message SpeechSettings {
46+
// Sensitivity of the speech model that detects the end of speech.
47+
// Scale from 0 to 100.
48+
int32 endpointer_sensitivity = 1;
49+
50+
// Timeout before detecting no speech.
51+
google.protobuf.Duration no_speech_timeout = 2;
52+
53+
// Use timeout based endpointing, interpreting endpointer sensitivy as
54+
// seconds of timeout value.
55+
bool use_timeout_based_endpointing = 3;
56+
57+
// Mapping from language to Speech-to-Text model. The mapped Speech-to-Text
58+
// model will be selected for requests from its corresponding language.
59+
// For more information, see
60+
// [Speech
61+
// models](https://cloud.google.com/dialogflow/cx/docs/concept/speech-models).
62+
map<string, string> models = 5;
63+
}
64+
4365
// Define behaviors for DTMF (dual tone multi frequency).
4466
message DtmfSettings {
4567
// If true, incoming audio is processed for DTMF (dual tone multi frequency)
@@ -55,15 +77,26 @@ message AdvancedSettings {
5577

5678
// The digit that terminates a DTMF digit sequence.
5779
string finish_digit = 3;
80+
81+
// Interdigit timeout setting for matching dtmf input to regex.
82+
google.protobuf.Duration interdigit_timeout_duration = 6;
83+
84+
// Endpoint timeout setting for matching dtmf input to regex.
85+
google.protobuf.Duration endpointing_timeout_duration = 7;
5886
}
5987

6088
// Define behaviors on logging.
6189
message LoggingSettings {
62-
// If true, StackDriver logging is currently enabled.
90+
// Enables StackDriver logging.
6391
bool enable_stackdriver_logging = 2;
6492

65-
// If true, DF Interaction logging is currently enabled.
93+
// Enables DF Interaction logging.
6694
bool enable_interaction_logging = 3;
95+
96+
// Enables consent-based end-user input redaction, if true, a pre-defined
97+
// session parameter `$session.params.conversation-redaction` will be
98+
// used to determine if the utterance should be redacted.
99+
bool enable_consent_based_redaction = 4;
67100
}
68101

69102
// If present, incoming audio is exported by Dialogflow to the configured
@@ -73,6 +106,14 @@ message AdvancedSettings {
73106
// - Flow level
74107
GcsDestination audio_export_gcs_destination = 2;
75108

109+
// Settings for speech to text detection.
110+
// Exposed at the following levels:
111+
// - Agent level
112+
// - Flow level
113+
// - Page level
114+
// - Parameter level
115+
SpeechSettings speech_settings = 3;
116+
76117
// Settings for DTMF.
77118
// Exposed at the following levels:
78119
// - Agent level

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

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,20 @@ message Agent {
254254
bool enable_answer_feedback = 1 [(google.api.field_behavior) = OPTIONAL];
255255
}
256256

257+
// Settings for end user personalization.
258+
message PersonalizationSettings {
259+
// Optional. Default end user metadata, used when processing DetectIntent
260+
// requests. Recommended to be filled as a template instead of hard-coded
261+
// value, for example { "age": "$session.params.age" }. The data will be
262+
// merged with the
263+
// [QueryParameters.end_user_metadata][google.cloud.dialogflow.cx.v3.QueryParameters.end_user_metadata]
264+
// in
265+
// [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3.DetectIntentRequest.query_params]
266+
// during query processing.
267+
google.protobuf.Struct default_end_user_metadata = 1
268+
[(google.api.field_behavior) = OPTIONAL];
269+
}
270+
257271
// The unique identifier of the agent.
258272
// Required for the
259273
// [Agents.UpdateAgent][google.cloud.dialogflow.cx.v3.Agents.UpdateAgent]
@@ -303,8 +317,7 @@ message Agent {
303317
// Immutable. Name of the start flow in this agent. A start flow will be
304318
// automatically created when the agent is created, and can only be deleted by
305319
// deleting the agent. Format: `projects/<Project ID>/locations/<Location
306-
// ID>/agents/<Agent ID>/flows/<Flow ID>`. Currently only the default start
307-
// flow with id "00000000-0000-0000-0000-000000000000" is allowed.
320+
// ID>/agents/<Agent ID>/flows/<Flow ID>`.
308321
string start_flow = 16 [
309322
(google.api.field_behavior) = IMMUTABLE,
310323
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }
@@ -328,6 +341,11 @@ message Agent {
328341
// requests.
329342
bool enable_spell_correction = 20;
330343

344+
// Optional. Enable training multi-lingual models for this agent. These models
345+
// will be trained on all the languages supported by the agent.
346+
bool enable_multi_language_training = 40
347+
[(google.api.field_behavior) = OPTIONAL];
348+
331349
// Indicates whether the agent is locked for changes. If the agent is locked,
332350
// modifications to the agent will be rejected except for [RestoreAgent][].
333351
bool locked = 27;
@@ -349,6 +367,10 @@ message Agent {
349367
// Optional. Answer feedback collection settings.
350368
AnswerFeedbackSettings answer_feedback_settings = 38
351369
[(google.api.field_behavior) = OPTIONAL];
370+
371+
// Optional. Settings for end user personalization.
372+
PersonalizationSettings personalization_settings = 42
373+
[(google.api.field_behavior) = OPTIONAL];
352374
}
353375

354376
// The request message for

google/cloud/dialogflow/cx/v3/data_store_connection.proto

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ syntax = "proto3";
1616

1717
package google.cloud.dialogflow.cx.v3;
1818

19+
import "google/api/field_behavior.proto";
20+
1921
option cc_enable_arenas = true;
2022
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3";
2123
option go_package = "cloud.google.com/go/dialogflow/cx/apiv3/cxpb;cxpb";
@@ -54,3 +56,183 @@ enum DataStoreType {
5456
// A data store that contains structured data (for example FAQ).
5557
STRUCTURED = 3;
5658
}
59+
60+
// Data store connection feature output signals.
61+
// Might be only partially field if processing stop before the final answer.
62+
// Reasons for this can be, but are not limited to: empty UCS search results,
63+
// positive RAI check outcome, grounding failure, ...
64+
message DataStoreConnectionSignals {
65+
// Diagnostic info related to the rewriter model call.
66+
message RewriterModelCallSignals {
67+
// Prompt as sent to the model.
68+
string rendered_prompt = 1;
69+
70+
// Output of the generative model.
71+
string model_output = 2;
72+
73+
// Name of the generative model. For example, "gemini-ultra", "gemini-pro",
74+
// "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown.
75+
string model = 3;
76+
}
77+
78+
// Search snippet details.
79+
message SearchSnippet {
80+
// Title of the enclosing document.
81+
string document_title = 1;
82+
83+
// Uri for the document. Present if specified for the document.
84+
string document_uri = 2;
85+
86+
// Text included in the prompt.
87+
string text = 3;
88+
}
89+
90+
// Diagnostic info related to the answer generation model call.
91+
message AnswerGenerationModelCallSignals {
92+
// Prompt as sent to the model.
93+
string rendered_prompt = 1;
94+
95+
// Output of the generative model.
96+
string model_output = 2;
97+
98+
// Name of the generative model. For example, "gemini-ultra", "gemini-pro",
99+
// "gemini-1.5-flash" etc. Defaults to "Other" if the model is unknown.
100+
string model = 3;
101+
}
102+
103+
// Answer part with citation.
104+
message AnswerPart {
105+
// Substring of the answer.
106+
string text = 1;
107+
108+
// Citations for this answer part. Indices of `search_snippets`.
109+
repeated int32 supporting_indices = 2;
110+
}
111+
112+
// Snippet cited by the answer generation model.
113+
message CitedSnippet {
114+
// Details of the snippet.
115+
SearchSnippet search_snippet = 1;
116+
117+
// Index of the snippet in `search_snippets` field.
118+
int32 snippet_index = 2;
119+
}
120+
121+
// Grounding signals.
122+
message GroundingSignals {
123+
// Represents the decision of the grounding check.
124+
enum GroundingDecision {
125+
// Decision not specified.
126+
GROUNDING_DECISION_UNSPECIFIED = 0;
127+
128+
// Grounding have accepted the answer.
129+
ACCEPTED_BY_GROUNDING = 1;
130+
131+
// Grounding have rejected the answer.
132+
REJECTED_BY_GROUNDING = 2;
133+
}
134+
135+
// Grounding score buckets.
136+
enum GroundingScoreBucket {
137+
// Score not specified.
138+
GROUNDING_SCORE_BUCKET_UNSPECIFIED = 0;
139+
140+
// We have very low confidence that the answer is grounded.
141+
VERY_LOW = 1;
142+
143+
// We have low confidence that the answer is grounded.
144+
LOW = 3;
145+
146+
// We have medium confidence that the answer is grounded.
147+
MEDIUM = 4;
148+
149+
// We have high confidence that the answer is grounded.
150+
HIGH = 5;
151+
152+
// We have very high confidence that the answer is grounded.
153+
VERY_HIGH = 6;
154+
}
155+
156+
// Represents the decision of the grounding check.
157+
GroundingDecision decision = 1;
158+
159+
// Grounding score bucket setting.
160+
GroundingScoreBucket score = 2;
161+
}
162+
163+
// Safety check results.
164+
message SafetySignals {
165+
// Safety decision.
166+
// All kinds of check are incorporated into this final decision, including
167+
// banned phrases check.
168+
enum SafetyDecision {
169+
// Decision not specified.
170+
SAFETY_DECISION_UNSPECIFIED = 0;
171+
172+
// No manual or automatic safety check fired.
173+
ACCEPTED_BY_SAFETY_CHECK = 1;
174+
175+
// One ore more safety checks fired.
176+
REJECTED_BY_SAFETY_CHECK = 2;
177+
}
178+
179+
// Specifies banned phrase match subject.
180+
enum BannedPhraseMatch {
181+
// No banned phrase check was executed.
182+
BANNED_PHRASE_MATCH_UNSPECIFIED = 0;
183+
184+
// All banned phrase checks led to no match.
185+
BANNED_PHRASE_MATCH_NONE = 1;
186+
187+
// A banned phrase matched the query.
188+
BANNED_PHRASE_MATCH_QUERY = 2;
189+
190+
// A banned phrase matched the response.
191+
BANNED_PHRASE_MATCH_RESPONSE = 3;
192+
}
193+
194+
// Safety decision.
195+
SafetyDecision decision = 1;
196+
197+
// Specifies banned phrase match subject.
198+
BannedPhraseMatch banned_phrase_match = 2;
199+
200+
// The matched banned phrase if there was a match.
201+
string matched_banned_phrase = 3;
202+
}
203+
204+
// Optional. Diagnostic info related to the rewriter model call.
205+
RewriterModelCallSignals rewriter_model_call_signals = 1
206+
[(google.api.field_behavior) = OPTIONAL];
207+
208+
// Optional. Rewritten string query used for search.
209+
string rewritten_query = 2 [(google.api.field_behavior) = OPTIONAL];
210+
211+
// Optional. Search snippets included in the answer generation prompt.
212+
repeated SearchSnippet search_snippets = 3
213+
[(google.api.field_behavior) = OPTIONAL];
214+
215+
// Optional. Diagnostic info related to the answer generation model call.
216+
AnswerGenerationModelCallSignals answer_generation_model_call_signals = 4
217+
[(google.api.field_behavior) = OPTIONAL];
218+
219+
// Optional. The final compiled answer.
220+
string answer = 5 [(google.api.field_behavior) = OPTIONAL];
221+
222+
// Optional. Answer parts with relevant citations.
223+
// Concatenation of texts should add up the `answer` (not counting
224+
// whitespaces).
225+
repeated AnswerPart answer_parts = 6 [(google.api.field_behavior) = OPTIONAL];
226+
227+
// Optional. Snippets cited by the answer generation model from the most to
228+
// least relevant.
229+
repeated CitedSnippet cited_snippets = 7
230+
[(google.api.field_behavior) = OPTIONAL];
231+
232+
// Optional. Grounding signals.
233+
GroundingSignals grounding_signals = 8
234+
[(google.api.field_behavior) = OPTIONAL];
235+
236+
// Optional. Safety check result.
237+
SafetySignals safety_signals = 9 [(google.api.field_behavior) = OPTIONAL];
238+
}

google/cloud/dialogflow/cx/v3/flow.proto

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,26 @@ message Flow {
256256
pattern: "projects/{project}/locations/{location}/agents/{agent}/flows/{flow}"
257257
};
258258

259+
// Settings for multi-lingual agents.
260+
message MultiLanguageSettings {
261+
// Optional. Enable multi-language detection for this flow. This can be set
262+
// only if [agent level multi language
263+
// setting][Agent.enable_multi_language_training] is enabled.
264+
bool enable_multi_language_detection = 1
265+
[(google.api.field_behavior) = OPTIONAL];
266+
267+
// Optional. Agent will respond in the detected language if the detected
268+
// language code is in the supported resolved languages for this flow. This
269+
// will be used only if multi-language training is enabled in the
270+
// [agent][google.cloud.dialogflow.cx.v3.Agent.enable_multi_language_training]
271+
// and multi-language detection is enabled in the
272+
// [flow][google.cloud.dialogflow.cx.v3.Flow.MultiLanguageSettings.enable_multi_language_detection].
273+
// The supported languages must be a subset of the languages supported by
274+
// the agent.
275+
repeated string supported_response_language_codes = 2
276+
[(google.api.field_behavior) = OPTIONAL];
277+
}
278+
259279
// The unique identifier of the flow.
260280
// Format: `projects/<Project ID>/locations/<Location ID>/agents/<Agent
261281
// ID>/flows/<Flow ID>`.
@@ -329,6 +349,14 @@ message Flow {
329349
// Optional. Knowledge connector configuration.
330350
KnowledgeConnectorSettings knowledge_connector_settings = 18
331351
[(google.api.field_behavior) = OPTIONAL];
352+
353+
// Optional. Multi-lingual agent settings for this flow.
354+
MultiLanguageSettings multi_language_settings = 28
355+
[(google.api.field_behavior) = OPTIONAL];
356+
357+
// Indicates whether the flow is locked for changes. If the flow is locked,
358+
// modifications to the flow will be rejected.
359+
bool locked = 30;
332360
}
333361

334362
// The request message for

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,11 +268,17 @@ message SecuritySettings {
268268
string audio_export_pattern = 2;
269269

270270
// Enable audio redaction if it is true.
271+
// Note that this only redacts end-user audio data;
272+
// Synthesised audio from the virtual agent is not redacted.
271273
bool enable_audio_redaction = 3;
272274

273275
// File format for exported audio file. Currently only in telephony
274276
// recordings.
275277
AudioFormat audio_format = 4;
278+
279+
// Whether to store TTS audio. By default, TTS audio from the virtual agent
280+
// is not exported.
281+
bool store_tts_audio = 6;
276282
}
277283

278284
// Settings for exporting conversations to
@@ -355,6 +361,9 @@ message SecuritySettings {
355361
// for Agent Assist traffic), higher value will be ignored and use default.
356362
// Setting a value higher than that has no effect. A missing value or
357363
// setting to 0 also means we use default TTL.
364+
// When data retention configuration is changed, it only applies to the data
365+
// created after the change; the TTL of existing data created before the
366+
// change stays intact.
358367
int32 retention_window_days = 6;
359368

360369
// Specifies the retention behavior defined by

0 commit comments

Comments
 (0)