diff --git a/google/cloud/dialogflow/v2beta1/BUILD.bazel b/google/cloud/dialogflow/v2beta1/BUILD.bazel index 9cfa1a410f..f762893292 100644 --- a/google/cloud/dialogflow/v2beta1/BUILD.bazel +++ b/google/cloud/dialogflow/v2beta1/BUILD.bazel @@ -96,6 +96,7 @@ java_gapic_library( srcs = [":dialogflow_proto_with_info"], gapic_yaml = None, grpc_service_config = "dialogflow_grpc_service_config.json", + rest_numeric_enums = False, service_yaml = "dialogflow_v2beta1.yaml", test_deps = [ ":dialogflow_java_grpc", @@ -189,6 +190,7 @@ go_gapic_library( grpc_service_config = "dialogflow_grpc_service_config.json", importpath = "cloud.google.com/go/dialogflow/apiv2beta1;dialogflow", metadata = True, + rest_numeric_enums = False, service_yaml = "dialogflow_v2beta1.yaml", transport = "grpc+rest", deps = [ @@ -234,8 +236,11 @@ py_gapic_library( name = "dialogflow_py_gapic", srcs = [":dialogflow_proto"], grpc_service_config = "dialogflow_grpc_service_config.json", + rest_numeric_enums = False, service_yaml = "dialogflow_v2beta1.yaml", transport = "grpc", + deps = [ + ], ) py_test( @@ -282,6 +287,7 @@ php_gapic_library( name = "dialogflow_php_gapic", srcs = [":dialogflow_proto_with_info"], grpc_service_config = "dialogflow_grpc_service_config.json", + rest_numeric_enums = False, service_yaml = "dialogflow_v2beta1.yaml", deps = [ ":dialogflow_php_grpc", @@ -316,6 +322,7 @@ nodejs_gapic_library( grpc_service_config = "dialogflow_grpc_service_config.json", main_service = "dialogflow", package = "google.cloud.dialogflow.v2beta1", + rest_numeric_enums = False, service_yaml = "dialogflow_v2beta1.yaml", deps = [], mixins = "google.longrunning.Operations;google.cloud.location.Locations", @@ -362,6 +369,7 @@ ruby_cloud_gapic_library( "ruby-cloud-product-url=https://cloud.google.com/dialogflow", ], grpc_service_config = "dialogflow_grpc_service_config.json", + rest_numeric_enums = False, 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.", ruby_cloud_title = "Dialogflow V2beta1", service_yaml = "dialogflow_v2beta1.yaml", @@ -408,6 +416,7 @@ csharp_gapic_library( srcs = [":dialogflow_proto_with_info"], common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json", grpc_service_config = "dialogflow_grpc_service_config.json", + rest_numeric_enums = False, service_yaml = "dialogflow_v2beta1.yaml", deps = [ ":dialogflow_csharp_grpc", diff --git a/google/cloud/dialogflow/v2beta1/conversation.proto b/google/cloud/dialogflow/v2beta1/conversation.proto index d044b4be03..432d8c0802 100644 --- a/google/cloud/dialogflow/v2beta1/conversation.proto +++ b/google/cloud/dialogflow/v2beta1/conversation.proto @@ -132,6 +132,21 @@ service Conversations { }; option (google.api.method_signature) = "parent"; } + + // Suggest summary for a conversation based on specific historical messages. + // The range of the messages to be used for summary can be specified in the + // request. + rpc SuggestConversationSummary(SuggestConversationSummaryRequest) returns (SuggestConversationSummaryResponse) { + option (google.api.http) = { + post: "/v2beta1/{conversation=projects/*/conversations/*}/suggestions:suggestConversationSummary" + body: "*" + additional_bindings { + post: "/v2beta1/{conversation=projects/*/locations/*/conversations/*}/suggestions:suggestConversationSummary" + body: "*" + } + }; + option (google.api.method_signature) = "conversation"; + } } // Represents a conversation. @@ -411,3 +426,69 @@ message ListMessagesResponse { // no more results in the list. string next_page_token = 2; } + +// The request message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary]. +message SuggestConversationSummaryRequest { + // Required. The conversation to fetch suggestion for. + // Format: `projects//locations//conversations/`. + string conversation = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Conversation" + } + ]; + + // The name of the latest conversation message used as context for + // compiling suggestion. If empty, the latest message of the conversation will + // be used. + // + // Format: `projects//locations//conversations//messages/`. + string latest_message = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; + + // Max number of messages prior to and including + // [latest_message] to use as context when compiling the + // suggestion. By default 500 and at most 1000. + int32 context_size = 4; +} + +// The response message for [Conversations.SuggestConversationSummary][google.cloud.dialogflow.v2beta1.Conversations.SuggestConversationSummary]. +message SuggestConversationSummaryResponse { + // Generated summary for a conversation. + message Summary { + // The summary content that is concatenated into one string. + string text = 1; + + // The summary content that is divided into sections. The key is the + // section's name and the value is the section's content. There is no + // specific format for the key or value. + map text_sections = 4; + + // The name of the answer record. Format: + // "projects//answerRecords/" + string answer_record = 3 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/AnswerRecord" + }]; + } + + // Generated summary. + Summary summary = 1; + + // The name of the latest conversation message used as context for + // compiling suggestion. + // + // Format: `projects//locations//conversations//messages/`. + string latest_message = 2 [(google.api.resource_reference) = { + type: "dialogflow.googleapis.com/Message" + }]; + + // Number of messages prior to and including + // [last_conversation_message][] used to compile the suggestion. It may be + // smaller than the [SuggestSummaryRequest.context_size][] field in the + // request if there weren't that many messages in the conversation. + int32 context_size = 3; +} diff --git a/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json b/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json index d03c5bd8d0..af87dcf15e 100755 --- a/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json +++ b/google/cloud/dialogflow/v2beta1/dialogflow_grpc_service_config.json @@ -74,6 +74,9 @@ { "service": "google.cloud.dialogflow.v2beta1.Environments" }, + { + "service": "google.cloud.dialogflow.v2beta1.FeatureCreationFlows" + }, { "service": "google.cloud.dialogflow.v2beta1.Fulfillments" }, @@ -201,6 +204,15 @@ } ], "timeout": "220s" + }, + { + "name": [ + { + "service": "google.cloud.dialogflow.v2beta1.Conversations", + "method": "StreamingListUpcomingCallCompanionEvents" + } + ], + "timeout": "600s" } ] } diff --git a/google/cloud/dialogflow/v2beta1/participant.proto b/google/cloud/dialogflow/v2beta1/participant.proto index 1d3489fe1a..1f7309b6e3 100644 --- a/google/cloud/dialogflow/v2beta1/participant.proto +++ b/google/cloud/dialogflow/v2beta1/participant.proto @@ -505,14 +505,17 @@ message SuggestionFeature { // Unspecified feature type. TYPE_UNSPECIFIED = 0; - // Run article suggestion model. + // Run article suggestion model for chat. ARTICLE_SUGGESTION = 1; // Run FAQ model. FAQ = 2; - // Run smart reply model. + // Run smart reply model for chat. SMART_REPLY = 3; + + // Run conversation summarization model for chat. + CONVERSATION_SUMMARIZATION = 8; } // Type of Human Agent Assistant API feature to request.