Skip to content

Commit 80a2081

Browse files
Google APIscopybara-github
authored andcommitted
feat: Added support for Build Your Own Assist feature
feat: Improved generator quota management feat: Context references added to conversation for dynamic data ingestion feat: Added Vertex extension tool support to v2/v2beta1 feat: add a turn complete signal to BidiStreamingAnalyzeContent docs: update documentation for transcription language code configuration feat: A new field 'security_settings' is added to GenerateStatelessSuggestionRequest feat: add Agent Assist Generator Evaluation feature feat: Expose skip_empty_event_based_suggestion in ConversationProfile feat: Expose debug info field in ConversationProfile feat: Expose flexible safety filter change, rai_settings in ConversationProfile feat: Added support for AI Coach feature feat: Added tool support for AI Coach feature docs: Updated comments for the `SuggestionInput` message, documenting how it is used with tools PiperOrigin-RevId: 822692160
1 parent 116326d commit 80a2081

18 files changed

+1987
-84
lines changed

google/cloud/dialogflow/v2beta1/BUILD.bazel

Lines changed: 32 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ proto_library(
2525
name = "dialogflow_proto",
2626
srcs = [
2727
"agent.proto",
28+
"agent_coaching_instruction.proto",
2829
"answer_record.proto",
2930
"audio_config.proto",
3031
"context.proto",
@@ -38,14 +39,18 @@ proto_library(
3839
"fulfillment.proto",
3940
"gcs.proto",
4041
"generator.proto",
42+
"generator_evaluation.proto",
4143
"human_agent_assistant_event.proto",
4244
"intent.proto",
4345
"knowledge_base.proto",
46+
"operations.proto",
4447
"participant.proto",
4548
"phone_number.proto",
4649
"session.proto",
4750
"session_entity_type.proto",
4851
"sip_trunk.proto",
52+
"tool.proto",
53+
"tool_call.proto",
4954
"validation_result.proto",
5055
"version.proto",
5156
"webhook.proto",
@@ -141,6 +146,8 @@ java_gapic_test(
141146
"com.google.cloud.dialogflow.v2beta1.EnvironmentsClientTest",
142147
"com.google.cloud.dialogflow.v2beta1.FulfillmentsClientHttpJsonTest",
143148
"com.google.cloud.dialogflow.v2beta1.FulfillmentsClientTest",
149+
"com.google.cloud.dialogflow.v2beta1.GeneratorEvaluationsClientHttpJsonTest",
150+
"com.google.cloud.dialogflow.v2beta1.GeneratorEvaluationsClientTest",
144151
"com.google.cloud.dialogflow.v2beta1.GeneratorsClientHttpJsonTest",
145152
"com.google.cloud.dialogflow.v2beta1.GeneratorsClientTest",
146153
"com.google.cloud.dialogflow.v2beta1.IntentsClientHttpJsonTest",
@@ -157,6 +164,8 @@ java_gapic_test(
157164
"com.google.cloud.dialogflow.v2beta1.SessionsClientTest",
158165
"com.google.cloud.dialogflow.v2beta1.SipTrunksClientHttpJsonTest",
159166
"com.google.cloud.dialogflow.v2beta1.SipTrunksClientTest",
167+
"com.google.cloud.dialogflow.v2beta1.ToolsClientHttpJsonTest",
168+
"com.google.cloud.dialogflow.v2beta1.ToolsClientTest",
160169
"com.google.cloud.dialogflow.v2beta1.VersionsClientHttpJsonTest",
161170
"com.google.cloud.dialogflow.v2beta1.VersionsClientTest",
162171
],
@@ -278,6 +287,8 @@ py_gapic_assembly_pkg(
278287
# buildifier: disable=same-origin-load
279288
load(
280289
"@com_google_googleapis_imports//:imports.bzl",
290+
"php_gapic_assembly_pkg",
291+
"php_gapic_library",
281292
"php_proto_library",
282293
)
283294

@@ -286,35 +297,27 @@ php_proto_library(
286297
deps = [":dialogflow_proto"],
287298
)
288299

289-
# PHP does not currently publish a client library for google/cloud/dialogflow/v2beta1.
290-
# In addition, generation fails in PHP when adding a 5-level deep nested message
291-
# such as `SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint`
292-
# with a field with annotation `[(google.api.field_behavior) = OPTIONAL];`
293-
# php_gapic_library(
294-
# name = "dialogflow_php_gapic",
295-
# srcs = [":dialogflow_proto_with_info"],
296-
# grpc_service_config = "dialogflow_grpc_service_config.json",
297-
# migration_mode = "PRE_MIGRATION_SURFACE_ONLY",
298-
# rest_numeric_enums = True,
299-
# service_yaml = "dialogflow_v2beta1.yaml",
300-
# transport = "grpc+rest",
301-
# deps = [
302-
# ":dialogflow_php_proto",
303-
# ],
304-
# )
305-
306-
# PHP does not currently publish a client library for google/cloud/dialogflow/v2beta1.
307-
# In addition, generation fails in PHP when adding a 5-level deep nested message
308-
# such as `SearchConfig.BoostSpecs.BoostSpec.ConditionBoostSpec.BoostControlSpec.ControlPoint`
309-
# with a field with annotation `[(google.api.field_behavior) = OPTIONAL];`
300+
php_gapic_library(
301+
name = "dialogflow_php_gapic",
302+
srcs = [":dialogflow_proto_with_info"],
303+
grpc_service_config = "dialogflow_grpc_service_config.json",
304+
migration_mode = "NEW_SURFACE_ONLY",
305+
rest_numeric_enums = True,
306+
service_yaml = "dialogflow_v2beta1.yaml",
307+
transport = "grpc+rest",
308+
deps = [
309+
":dialogflow_php_proto",
310+
],
311+
)
312+
310313
# Open Source Packages
311-
# php_gapic_assembly_pkg(
312-
# name = "google-cloud-dialogflow-v2beta1-php",
313-
# deps = [
314-
# ":dialogflow_php_gapic",
315-
# ":dialogflow_php_proto",
316-
# ],
317-
# )
314+
php_gapic_assembly_pkg(
315+
name = "google-cloud-dialogflow-v2beta1-php",
316+
deps = [
317+
":dialogflow_php_gapic",
318+
":dialogflow_php_proto",
319+
],
320+
)
318321

319322
##############################################################################
320323
# Node.js
@@ -417,6 +420,7 @@ load(
417420

418421
csharp_proto_library(
419422
name = "dialogflow_csharp_proto",
423+
extra_opts = [],
420424
deps = [":dialogflow_proto"],
421425
)
422426

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// Copyright 2025 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
syntax = "proto3";
16+
17+
package google.cloud.dialogflow.v2beta1;
18+
19+
import "google/api/field_behavior.proto";
20+
21+
option csharp_namespace = "Google.Cloud.Dialogflow.V2Beta1";
22+
option go_package = "cloud.google.com/go/dialogflow/apiv2beta1/dialogflowpb;dialogflowpb";
23+
option java_multiple_files = true;
24+
option java_outer_classname = "AgentCoachingInstructionProto";
25+
option java_package = "com.google.cloud.dialogflow.v2beta1";
26+
option objc_class_prefix = "DF";
27+
28+
// Agent Coaching instructions that customer can configure.
29+
message AgentCoachingInstruction {
30+
// Duplication check for the suggestion.
31+
message DuplicateCheckResult {
32+
// The duplicate suggestion details.
33+
message DuplicateSuggestion {
34+
// Output only. The answer record id of the past duplicate suggestion.
35+
string answer_record = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
36+
37+
// Output only. The index of the duplicate suggestion in the past
38+
// suggestion list.
39+
int32 suggestion_index = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
40+
41+
// Output only. The similarity score of between the past and current
42+
// suggestion.
43+
float similarity_score = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
44+
}
45+
46+
// Output only. The duplicate suggestions.
47+
repeated DuplicateSuggestion duplicate_suggestions = 1
48+
[(google.api.field_behavior) = OUTPUT_ONLY];
49+
}
50+
51+
// Optional. Display name for the instruction.
52+
string display_name = 1 [(google.api.field_behavior) = OPTIONAL];
53+
54+
// Optional. The detailed description of this instruction.
55+
string display_details = 2 [(google.api.field_behavior) = OPTIONAL];
56+
57+
// Optional. The condition of the instruction. For example, "the customer
58+
// wants to cancel an order". If the users want the instruction to be
59+
// triggered unconditionally, the condition can be empty.
60+
string condition = 3 [(google.api.field_behavior) = OPTIONAL];
61+
62+
// Optional. The action that human agent should take. For example, "apologize
63+
// for the slow shipping". If the users only want to use agent coaching for
64+
// intent detection, agent_action can be empty
65+
string agent_action = 4 [(google.api.field_behavior) = OPTIONAL];
66+
67+
// Optional. The action that system should take. For example,
68+
// "call GetOrderTime with order_number={order number provided by the
69+
// customer}". If the users don't have plugins or don't want to trigger
70+
// plugins, the system_action can be empty
71+
string system_action = 5 [(google.api.field_behavior) = OPTIONAL];
72+
73+
// Output only. Duplication check for the AgentCoachingInstruction.
74+
DuplicateCheckResult duplicate_check_result = 8
75+
[(google.api.field_behavior) = OUTPUT_ONLY];
76+
}

google/cloud/dialogflow/v2beta1/answer_record.proto

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import "google/api/annotations.proto";
2020
import "google/api/client.proto";
2121
import "google/api/field_behavior.proto";
2222
import "google/api/resource.proto";
23+
import "google/cloud/dialogflow/v2beta1/generator.proto";
2324
import "google/cloud/dialogflow/v2beta1/participant.proto";
2425
import "google/protobuf/field_mask.proto";
2526
import "google/protobuf/timestamp.proto";
@@ -147,6 +148,10 @@ message AgentAssistantRecord {
147148
// Output only. The Dialogflow assist answer.
148149
DialogflowAssistAnswer dialogflow_assist_answer = 7
149150
[(google.api.field_behavior) = OUTPUT_ONLY];
151+
152+
// Output only. The generator suggestion.
153+
GeneratorSuggestion generator_suggestion = 8
154+
[(google.api.field_behavior) = OUTPUT_ONLY];
150155
}
151156
}
152157

google/cloud/dialogflow/v2beta1/audio_config.proto

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,8 @@ message InputAudioConfig {
151151
// Support](https://cloud.google.com/dialogflow/docs/reference/language)
152152
// for a list of the currently supported language codes. Note that queries in
153153
// the same session do not necessarily need to specify the same language.
154+
// If not set, the language is inferred from the
155+
// [ConversationProfile.stt_config][google.cloud.dialogflow.v2beta1.ConversationProfile.stt_config].
154156
string language_code = 3 [(google.api.field_behavior) = REQUIRED];
155157

156158
// If `true`, Dialogflow returns
@@ -281,6 +283,38 @@ message SynthesizeSpeechConfig {
281283

282284
// Optional. The desired voice of the synthesized audio.
283285
VoiceSelectionParams voice = 4 [(google.api.field_behavior) = OPTIONAL];
286+
287+
// Optional. The custom pronunciations for the synthesized audio.
288+
repeated CustomPronunciationParams pronunciations = 6;
289+
}
290+
291+
// Pronunciation customization for a phrase.
292+
message CustomPronunciationParams {
293+
// The phonetic encoding of the phrase.
294+
enum PhoneticEncoding {
295+
// Not specified.
296+
PHONETIC_ENCODING_UNSPECIFIED = 0;
297+
298+
// IPA, such as apple -> ˈæpəl.
299+
// https://en.wikipedia.org/wiki/International_Phonetic_Alphabet
300+
PHONETIC_ENCODING_IPA = 1;
301+
302+
// X-SAMPA, such as apple -> "{p@l".
303+
// https://en.wikipedia.org/wiki/X-SAMPA
304+
PHONETIC_ENCODING_X_SAMPA = 2;
305+
}
306+
307+
// The phrase to which the customization is applied.
308+
// The phrase can be multiple words, such as proper nouns, but shouldn't span
309+
// the length of the sentence.
310+
string phrase = 1;
311+
312+
// The phonetic encoding of the phrase.
313+
PhoneticEncoding phonetic_encoding = 2;
314+
315+
// The pronunciation of the phrase. This must be in the phonetic encoding
316+
// specified above.
317+
string pronunciation = 3;
284318
}
285319

286320
// Instructs the speech synthesizer how to generate the output audio content.
@@ -368,6 +402,9 @@ message SpeechToTextConfig {
368402
// Support](https://cloud.google.com/dialogflow/docs/reference/language)
369403
// for a list of the currently supported language codes. Note that queries in
370404
// the same session do not necessarily need to specify the same language.
405+
// If not specified, the default language configured at
406+
// [ConversationProfile][google.cloud.dialogflow.v2beta1.ConversationProfile]
407+
// is used.
371408
string language_code = 8;
372409

373410
// If `true`, Dialogflow returns

google/cloud/dialogflow/v2beta1/conversation.proto

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ option (google.api.resource_definition) = {
3838
pattern: "projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}"
3939
pattern: "projects/{project}/locations/{location}/dataStores/{data_store}"
4040
};
41+
option (google.api.resource_definition) = {
42+
type: "ces.googleapis.com/Tool"
43+
pattern: "projects/{project}/locations/{location}/apps/{app}/tools/{tool}"
44+
};
4145

4246
// Service for managing
4347
// [Conversations][google.cloud.dialogflow.v2beta1.Conversation].
@@ -302,8 +306,9 @@ message Conversation {
302306
// Output only. The number dialed to connect this call in E.164 format.
303307
string dialed_number = 2 [(google.api.field_behavior) = OUTPUT_ONLY];
304308

305-
// Optional. SDP of the call. It's initially the SDP answer to the endpoint,
306-
// but maybe later updated for the purpose of making the link active, etc.
309+
// Optional. SDP of the call. It's initially the SDP answer to the incoming
310+
// call, but maybe later updated for the purpose of making the link active,
311+
// etc.
307312
string sdp = 5 [(google.api.field_behavior) = OPTIONAL];
308313

309314
// Output only. The SIP headers from the initial SIP INVITE.
@@ -341,6 +346,12 @@ message Conversation {
341346
// relevant context reference.
342347
google.protobuf.Timestamp ingestion_time = 3
343348
[(google.api.field_behavior) = OUTPUT_ONLY];
349+
350+
// If the context content was generated from a tool call, specify the
351+
// answer record associated with the tool call.
352+
// Format: `projects/<Project ID>/locations/<Location
353+
// ID>/answerRecords/<Answer Record ID>`.
354+
string answer_record = 4;
344355
}
345356

346357
// Represents the mode in which context reference contents are updated.
@@ -862,6 +873,16 @@ message GenerateStatelessSuggestionRequest {
862873
// it's trigger event is included here.
863874
repeated TriggerEvent trigger_events = 6
864875
[(google.api.field_behavior) = OPTIONAL];
876+
877+
// Optional. Name of the CX SecuritySettings which is used to redact generated
878+
// response. If this field is empty, try to fetch v2 security_settings, which
879+
// is a project level setting. If this field is empty and no v2
880+
// security_settings set up in this project, no redaction will be done.
881+
//
882+
// Format:
883+
// `projects/<Project ID>/locations/<Location ID>/securitySettings/<Security
884+
// Settings ID>`.
885+
string security_settings = 8 [(google.api.field_behavior) = OPTIONAL];
865886
}
866887

867888
// The response message for

google/cloud/dialogflow/v2beta1/conversation_event.proto

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

1717
package google.cloud.dialogflow.v2beta1;
1818

19+
import "google/api/field_behavior.proto";
20+
import "google/api/resource.proto";
1921
import "google/cloud/dialogflow/v2beta1/participant.proto";
2022
import "google/cloud/dialogflow/v2beta1/session.proto";
2123
import "google/rpc/status.proto";

0 commit comments

Comments
 (0)