Skip to content

Commit 5b25280

Browse files
Google APIscopybara-github
authored andcommitted
feat: added support for DataStoreConnection, DataStoreConnectionSettings
feat: added support for SpeechSettings feat: added support for MultiLanguageSettings feat: added support for PersonalizationSettings feat: added support for Webhook OAuthConfig, and ServiceAgentAuth Settings. docs: clarified wording around quota usage PiperOrigin-RevId: 619327167
1 parent 9b6f3aa commit 5b25280

7 files changed

Lines changed: 327 additions & 6 deletions

File tree

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

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

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

2223
option cc_enable_arenas = true;
2324
option csharp_namespace = "Google.Cloud.Dialogflow.Cx.V3Beta1";
@@ -40,6 +41,27 @@ option ruby_package = "Google::Cloud::Dialogflow::CX::V3beta1";
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)
@@ -73,6 +95,14 @@ message AdvancedSettings {
7395
// - Flow level
7496
GcsDestination audio_export_gcs_destination = 2;
7597

98+
// Settings for speech to text detection.
99+
// Exposed at the following levels:
100+
// - Agent level
101+
// - Flow level
102+
// - Page level
103+
// - Parameter level
104+
SpeechSettings speech_settings = 3;
105+
76106
// Settings for DTMF.
77107
// Exposed at the following levels:
78108
// - Agent level

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

Lines changed: 26 additions & 6 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.v3beta1.QueryParameters.end_user_metadata]
264+
// in
265+
// [DetectIntentRequest.query_params][google.cloud.dialogflow.cx.v3beta1.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.v3beta1.Agents.UpdateAgent]
@@ -300,15 +314,12 @@ message Agent {
300314
// Speech recognition related settings.
301315
SpeechToTextSettings speech_to_text_settings = 13;
302316

303-
// Optional. Name of the start flow in this agent. A start flow will be
317+
// 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.
308-
//
309-
// Only one of `start_flow` or `start_playbook` should be set, but not both.
320+
// ID>/agents/<Agent ID>/flows/<Flow ID>`.
310321
string start_flow = 16 [
311-
(google.api.field_behavior) = OPTIONAL,
322+
(google.api.field_behavior) = IMMUTABLE,
312323
(google.api.resource_reference) = { type: "dialogflow.googleapis.com/Flow" }
313324
];
314325

@@ -346,6 +357,11 @@ message Agent {
346357
// requests.
347358
bool enable_spell_correction = 20;
348359

360+
// Optional. Enable training multi-lingual models for this agent. These models
361+
// will be trained on all the languages supported by the agent.
362+
bool enable_multi_language_training = 40
363+
[(google.api.field_behavior) = OPTIONAL];
364+
349365
// Indicates whether the agent is locked for changes. If the agent is locked,
350366
// modifications to the agent will be rejected except for [RestoreAgent][].
351367
bool locked = 27;
@@ -367,6 +383,10 @@ message Agent {
367383
// Optional. Answer feedback collection settings.
368384
AnswerFeedbackSettings answer_feedback_settings = 38
369385
[(google.api.field_behavior) = OPTIONAL];
386+
387+
// Optional. Settings for end user personalization.
388+
PersonalizationSettings personalization_settings = 42
389+
[(google.api.field_behavior) = OPTIONAL];
370390
}
371391

372392
// The request message for

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

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

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

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

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

Lines changed: 24 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.v3beta1.Agent.enable_multi_language_training]
271+
// and multi-language detection is enabled in the
272+
// [flow][google.cloud.dialogflow.cx.v3beta1.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,10 @@ 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];
332356
}
333357

334358
// The request message for

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ 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
@@ -357,6 +359,9 @@ message SecuritySettings {
357359
// for Agent Assist traffic), higher value will be ignored and use default.
358360
// Setting a value higher than that has no effect. A missing value or
359361
// setting to 0 also means we use default TTL.
362+
// When data retention configuration is changed, it only applies to the data
363+
// created after the change; the TTL of existing data created before the
364+
// change stays intact.
360365
int32 retention_window_days = 6;
361366

362367
// Specifies the retention behavior defined by

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
2323
import "google/cloud/dialogflow/cx/v3beta1/advanced_settings.proto";
2424
import "google/cloud/dialogflow/cx/v3beta1/audio_config.proto";
25+
import "google/cloud/dialogflow/cx/v3beta1/data_store_connection.proto";
2526
import "google/cloud/dialogflow/cx/v3beta1/example.proto";
2627
import "google/cloud/dialogflow/cx/v3beta1/flow.proto";
2728
import "google/cloud/dialogflow/cx/v3beta1/generative_settings.proto";
@@ -749,6 +750,13 @@ message QueryParameters {
749750

750751
// Optional. Search configuration for UCS search queries.
751752
SearchConfig search_config = 20 [(google.api.field_behavior) = OPTIONAL];
753+
754+
// Optional. If set to true and data stores are involved in serving the
755+
// request then
756+
// DetectIntentResponse.query_result.data_store_connection_signals
757+
// will be filled with data that can help evaluations.
758+
bool populate_data_store_connection_signals = 25
759+
[(google.api.field_behavior) = OPTIONAL];
752760
}
753761

754762
// Search configuration for UCS search queries.
@@ -1047,6 +1055,13 @@ message QueryResult {
10471055
// Indicates whether the Thumbs up/Thumbs down rating controls are need to be
10481056
// shown for the response in the Dialogflow Messenger widget.
10491057
bool allow_answer_feedback = 32;
1058+
1059+
// Optional. Data store connection feature output signals.
1060+
// Filled only when data stores are involved in serving the query and
1061+
// DetectIntentRequest.populate data_store_connection_quality_signals is set
1062+
// to true in the request.
1063+
DataStoreConnectionSignals data_store_connection_signals = 35
1064+
[(google.api.field_behavior) = OPTIONAL];
10501065
}
10511066

10521067
// Represents the natural language text to be processed.

0 commit comments

Comments
 (0)