Skip to content

Commit 3784b36

Browse files
Google APIscopybara-github
authored andcommitted
feat: updated v3beta1 dialogflow client libraries
PiperOrigin-RevId: 843704214
1 parent 7a595fd commit 3784b36

File tree

3 files changed

+100
-12
lines changed

3 files changed

+100
-12
lines changed

google/cloud/dialogflow/cx/v3beta1/dialogflow_v3beta1.yaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -62,20 +62,16 @@ documentation:
6262
Builds conversational interfaces (for example, chatbots, and voice-powered
6363
apps and devices).
6464
overview: |-
65-
<!-- mdformat off(presubmit failing, mdformat is as well) --> Dialogflow is
66-
a natural language understanding platform that makes it easy
65+
Dialogflow is a natural language understanding platform that makes it easy
6766
to design and integrate a conversational user interface into your mobile
6867
app, web application, device, bot, interactive voice response system, and
69-
so on. Using Dialogflow, you can provide new and engaging ways for
70-
users to interact with your product.
71-
72-
Dialogflow can analyze multiple types of input from your customers,
73-
including text or audio inputs (like from a phone or voice recording).
74-
It can also respond to your customers in a couple of ways, either through
75-
text or with synthetic speech.
76-
77-
For more information, see the
78-
[Dialogflow documentation](https://cloud.google.com/dialogflow/docs).
68+
so on. Using Dialogflow, you can provide new and engaging ways for users
69+
to interact with your product. Dialogflow can analyze multiple types of
70+
input from your customers, including text or audio inputs (like from a
71+
phone or voice recording). It can also respond to your customers in a
72+
couple of ways, either through text or with synthetic speech. For more
73+
information, see the [Dialogflow
74+
documentation](https://cloud.google.com/dialogflow/docs).
7975
rules:
8076
- selector: google.cloud.location.Locations.GetLocation
8177
description: Gets information about a location.

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

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,58 @@ message SafetySettings {
5151
WORD_MATCH = 2;
5252
}
5353

54+
// Settings for Responsible AI.
55+
message RaiSettings {
56+
// Sensitivity level for RAI categories.
57+
enum SafetyFilterLevel {
58+
// Unspecified -- uses default sensitivity levels.
59+
SAFETY_FILTER_LEVEL_UNSPECIFIED = 0;
60+
61+
// Block no text -- effectively disables the category.
62+
BLOCK_NONE = 1;
63+
64+
// Block a few suspicious texts.
65+
BLOCK_FEW = 2;
66+
67+
// Block some suspicious texts.
68+
BLOCK_SOME = 3;
69+
70+
// Block most suspicious texts.
71+
BLOCK_MOST = 4;
72+
}
73+
74+
// RAI categories to configure.
75+
enum SafetyCategory {
76+
// Unspecified.
77+
SAFETY_CATEGORY_UNSPECIFIED = 0;
78+
79+
// Dangerous content.
80+
DANGEROUS_CONTENT = 1;
81+
82+
// Hate speech.
83+
HATE_SPEECH = 2;
84+
85+
// Harassment.
86+
HARASSMENT = 3;
87+
88+
// Sexually explicit content.
89+
SEXUALLY_EXPLICIT_CONTENT = 4;
90+
}
91+
92+
// Configuration of the sensitivity level for blocking an RAI category.
93+
message CategoryFilter {
94+
// RAI category to configure.
95+
SafetyCategory category = 1;
96+
97+
// Blocking sensitivity level to configure for the RAI category.
98+
SafetyFilterLevel filter_level = 2;
99+
}
100+
101+
// Optional. RAI blocking configurations.
102+
repeated CategoryFilter category_filters = 3
103+
[(google.api.field_behavior) = OPTIONAL];
104+
}
105+
54106
// Settings for prompt security checks.
55107
message PromptSecuritySettings {
56108
// Optional. Enable prompt security checks.
@@ -64,6 +116,17 @@ message SafetySettings {
64116
// Banned phrases for generated text.
65117
repeated Phrase banned_phrases = 1;
66118

119+
// Optional. Settings for Responsible AI checks.
120+
RaiSettings rai_settings = 2 [(google.api.field_behavior) = OPTIONAL];
121+
122+
// Optional. Immutable. Default RAI settings to be annotated on the agent, so
123+
// that users will be able to restore their RAI configurations to the default
124+
// settings. Read-only field for the API proto only.
125+
RaiSettings default_rai_settings = 3 [
126+
(google.api.field_behavior) = OPTIONAL,
127+
(google.api.field_behavior) = IMMUTABLE
128+
];
129+
67130
// Optional. Settings for prompt security checks.
68131
PromptSecuritySettings prompt_security_settings = 8
69132
[(google.api.field_behavior) = OPTIONAL];

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

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,12 @@ message DetectIntentRequest {
249249

250250
// Instructs the speech synthesizer how to generate the output audio.
251251
OutputAudioConfig output_audio_config = 4;
252+
253+
// Optional. Specifies which fields in the
254+
// [QueryResult][google.cloud.dialogflow.cx.v3beta1.QueryResult] to return. If
255+
// not set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
256+
DetectIntentResponseView response_view = 9
257+
[(google.api.field_behavior) = OPTIONAL];
252258
}
253259

254260
// The message returned from the DetectIntent method.
@@ -372,6 +378,12 @@ message StreamingDetectIntentRequest {
372378

373379
// If true, `StreamingDetectIntentResponse.debugging_info` will get populated.
374380
bool enable_debugging_info = 8;
381+
382+
// Optional. Specifies which fields in the
383+
// [QueryResult][google.cloud.dialogflow.cx.v3beta1.QueryResult] to return. If
384+
// not set, the default is DETECT_INTENT_RESPONSE_VIEW_FULL.
385+
DetectIntentResponseView response_view = 16
386+
[(google.api.field_behavior) = OPTIONAL];
375387
}
376388

377389
// Cloud conversation info for easier debugging.
@@ -1408,3 +1420,20 @@ message SentimentAnalysisResult {
14081420
// magnitude of sentiment, regardless of score (positive or negative).
14091421
float magnitude = 2;
14101422
}
1423+
1424+
// The response view specifies which fields in the
1425+
// [QueryResult][google.cloud.dialogflow.cx.v3beta1.QueryResult] to return.
1426+
enum DetectIntentResponseView {
1427+
// Not specified. `FULL` will be used.
1428+
DETECT_INTENT_RESPONSE_VIEW_UNSPECIFIED = 0;
1429+
1430+
// Full response view includes all fields.
1431+
DETECT_INTENT_RESPONSE_VIEW_FULL = 1;
1432+
1433+
// Basic response view omits the following fields:
1434+
// -
1435+
// [QueryResult.diagnostic_info][google.cloud.dialogflow.cx.v3beta1.QueryResult.diagnostic_info]
1436+
// -
1437+
// [QueryResult.generative_info][google.cloud.dialogflow.cx.v3beta1.QueryResult.generative_info]
1438+
DETECT_INTENT_RESPONSE_VIEW_BASIC = 2;
1439+
}

0 commit comments

Comments
 (0)