Skip to content

Commit 6deca98

Browse files
Google APIscopybara-github
authored andcommitted
docs: clarify SuggestionFeature enums which are specific to chat agents PiperOrigin-RevId: 477479918
1 parent 6954c4d commit 6deca98

4 files changed

Lines changed: 107 additions & 2 deletions

File tree

google/cloud/dialogflow/v2beta1/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ java_gapic_library(
9696
srcs = [":dialogflow_proto_with_info"],
9797
gapic_yaml = None,
9898
grpc_service_config = "dialogflow_grpc_service_config.json",
99+
rest_numeric_enums = False,
99100
service_yaml = "dialogflow_v2beta1.yaml",
100101
test_deps = [
101102
":dialogflow_java_grpc",
@@ -189,6 +190,7 @@ go_gapic_library(
189190
grpc_service_config = "dialogflow_grpc_service_config.json",
190191
importpath = "cloud.google.com/go/dialogflow/apiv2beta1;dialogflow",
191192
metadata = True,
193+
rest_numeric_enums = False,
192194
service_yaml = "dialogflow_v2beta1.yaml",
193195
transport = "grpc+rest",
194196
deps = [
@@ -234,8 +236,11 @@ py_gapic_library(
234236
name = "dialogflow_py_gapic",
235237
srcs = [":dialogflow_proto"],
236238
grpc_service_config = "dialogflow_grpc_service_config.json",
239+
rest_numeric_enums = False,
237240
service_yaml = "dialogflow_v2beta1.yaml",
238241
transport = "grpc",
242+
deps = [
243+
],
239244
)
240245

241246
py_test(
@@ -282,6 +287,7 @@ php_gapic_library(
282287
name = "dialogflow_php_gapic",
283288
srcs = [":dialogflow_proto_with_info"],
284289
grpc_service_config = "dialogflow_grpc_service_config.json",
290+
rest_numeric_enums = False,
285291
service_yaml = "dialogflow_v2beta1.yaml",
286292
deps = [
287293
":dialogflow_php_grpc",
@@ -316,6 +322,7 @@ nodejs_gapic_library(
316322
grpc_service_config = "dialogflow_grpc_service_config.json",
317323
main_service = "dialogflow",
318324
package = "google.cloud.dialogflow.v2beta1",
325+
rest_numeric_enums = False,
319326
service_yaml = "dialogflow_v2beta1.yaml",
320327
deps = [],
321328
mixins = "google.longrunning.Operations;google.cloud.location.Locations",
@@ -362,6 +369,7 @@ ruby_cloud_gapic_library(
362369
"ruby-cloud-product-url=https://cloud.google.com/dialogflow",
363370
],
364371
grpc_service_config = "dialogflow_grpc_service_config.json",
372+
rest_numeric_enums = False,
365373
ruby_cloud_description = "Dialogflow is an end-to-end, build-once deploy-everywhere development suite for creating conversational interfaces for websites, mobile applications, popular messaging platforms, and IoT devices. You can use it to build interfaces (such as chatbots and conversational IVR) that enable natural and rich interactions between your users and your business. This client is for Dialogflow ES, providing the standard agent type suitable for small and simple agents.",
366374
ruby_cloud_title = "Dialogflow V2beta1",
367375
service_yaml = "dialogflow_v2beta1.yaml",
@@ -408,6 +416,7 @@ csharp_gapic_library(
408416
srcs = [":dialogflow_proto_with_info"],
409417
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
410418
grpc_service_config = "dialogflow_grpc_service_config.json",
419+
rest_numeric_enums = False,
411420
service_yaml = "dialogflow_v2beta1.yaml",
412421
deps = [
413422
":dialogflow_csharp_grpc",

google/cloud/dialogflow/v2beta1/conversation.proto

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,21 @@ service Conversations {
132132
};
133133
option (google.api.method_signature) = "parent";
134134
}
135+
136+
// Suggest summary for a conversation based on specific historical messages.
137+
// The range of the messages to be used for summary can be specified in the
138+
// request.
139+
rpc SuggestConversationSummary(SuggestConversationSummaryRequest) returns (SuggestConversationSummaryResponse) {
140+
option (google.api.http) = {
141+
post: "/v2beta1/{conversation=projects/*/conversations/*}/suggestions:suggestConversationSummary"
142+
body: "*"
143+
additional_bindings {
144+
post: "/v2beta1/{conversation=projects/*/locations/*/conversations/*}/suggestions:suggestConversationSummary"
145+
body: "*"
146+
}
147+
};
148+
option (google.api.method_signature) = "conversation";
149+
}
135150
}
136151

137152
// Represents a conversation.
@@ -411,3 +426,69 @@ message ListMessagesResponse {
411426
// no more results in the list.
412427
string next_page_token = 2;
413428
}
429+
430+
// The request message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary].
431+
message SuggestConversationSummaryRequest {
432+
// Required. The conversation to fetch suggestion for.
433+
// Format: `projects/<Project ID>/locations/<Location
434+
// ID>/conversations/<Conversation ID>`.
435+
string conversation = 1 [
436+
(google.api.field_behavior) = REQUIRED,
437+
(google.api.resource_reference) = {
438+
type: "dialogflow.googleapis.com/Conversation"
439+
}
440+
];
441+
442+
// The name of the latest conversation message used as context for
443+
// compiling suggestion. If empty, the latest message of the conversation will
444+
// be used.
445+
//
446+
// Format: `projects/<Project ID>/locations/<Location
447+
// ID>/conversations/<Conversation ID>/messages/<Message ID>`.
448+
string latest_message = 3 [(google.api.resource_reference) = {
449+
type: "dialogflow.googleapis.com/Message"
450+
}];
451+
452+
// Max number of messages prior to and including
453+
// [latest_message] to use as context when compiling the
454+
// suggestion. By default 500 and at most 1000.
455+
int32 context_size = 4;
456+
}
457+
458+
// The response message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary].
459+
message SuggestConversationSummaryResponse {
460+
// Generated summary for a conversation.
461+
message Summary {
462+
// The summary content that is concatenated into one string.
463+
string text = 1;
464+
465+
// The summary content that is divided into sections. The key is the
466+
// section's name and the value is the section's content. There is no
467+
// specific format for the key or value.
468+
map<string, string> text_sections = 4;
469+
470+
// The name of the answer record. Format:
471+
// "projects/<Project ID>/answerRecords/<Answer Record ID>"
472+
string answer_record = 3 [(google.api.resource_reference) = {
473+
type: "dialogflow.googleapis.com/AnswerRecord"
474+
}];
475+
}
476+
477+
// Generated summary.
478+
Summary summary = 1;
479+
480+
// The name of the latest conversation message used as context for
481+
// compiling suggestion.
482+
//
483+
// Format: `projects/<Project ID>/locations/<Location
484+
// ID>/conversations/<Conversation ID>/messages/<Message ID>`.
485+
string latest_message = 2 [(google.api.resource_reference) = {
486+
type: "dialogflow.googleapis.com/Message"
487+
}];
488+
489+
// Number of messages prior to and including
490+
// [last_conversation_message][] used to compile the suggestion. It may be
491+
// smaller than the [SuggestSummaryRequest.context_size][] field in the
492+
// request if there weren't that many messages in the conversation.
493+
int32 context_size = 3;
494+
}

google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@
7474
{
7575
"service": "google.cloud.dialogflow.v2beta1.Environments"
7676
},
77+
{
78+
"service": "google.cloud.dialogflow.v2beta1.FeatureCreationFlows"
79+
},
7780
{
7881
"service": "google.cloud.dialogflow.v2beta1.Fulfillments"
7982
},
@@ -201,6 +204,15 @@
201204
}
202205
],
203206
"timeout": "220s"
207+
},
208+
{
209+
"name": [
210+
{
211+
"service": "google.cloud.dialogflow.v2beta1.Conversations",
212+
"method": "StreamingListUpcomingCallCompanionEvents"
213+
}
214+
],
215+
"timeout": "600s"
204216
}
205217
]
206218
}

google/cloud/dialogflow/v2beta1/participant.proto

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -505,14 +505,17 @@ message SuggestionFeature {
505505
// Unspecified feature type.
506506
TYPE_UNSPECIFIED = 0;
507507

508-
// Run article suggestion model.
508+
// Run article suggestion model for chat.
509509
ARTICLE_SUGGESTION = 1;
510510

511511
// Run FAQ model.
512512
FAQ = 2;
513513

514-
// Run smart reply model.
514+
// Run smart reply model for chat.
515515
SMART_REPLY = 3;
516+
517+
// Run conversation summarization model for chat.
518+
CONVERSATION_SUMMARIZATION = 8;
516519
}
517520

518521
// Type of Human Agent Assistant API feature to request.

0 commit comments

Comments
 (0)