docs: clarify SuggestionFeature enums which are specific to chat agents

PiperOrigin-RevId: 477479918
This commit is contained in:
Google APIs 2022-09-28 09:58:08 -07:00 committed by Copybara-Service
parent 6954c4da0f
commit 6deca98670
4 changed files with 107 additions and 2 deletions

View file

@ -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",

View file

@ -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/<Project ID>/locations/<Location
// ID>/conversations/<Conversation ID>`.
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/<Project ID>/locations/<Location
// ID>/conversations/<Conversation ID>/messages/<Message ID>`.
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<string, string> text_sections = 4;
// The name of the answer record. Format:
// "projects/<Project ID>/answerRecords/<Answer Record ID>"
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/<Project ID>/locations/<Location
// ID>/conversations/<Conversation ID>/messages/<Message ID>`.
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;
}

View file

@ -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"
}
]
}

View file

@ -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.