Skip to content

Commit 155e0f4

Browse files
Google APIscopybara-github
authored andcommitted
feat: Added SuggestConversationSummary RPC
docs: updated go library package PiperOrigin-RevId: 501862436
1 parent 1e24101 commit 155e0f4

24 files changed

Lines changed: 1099 additions & 588 deletions

google/cloud/dialogflow/v2/BUILD.bazel

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ load(
180180
go_proto_library(
181181
name = "dialogflow_go_proto",
182182
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
183-
importpath = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2",
183+
importpath = "cloud.google.com/go/dialogflow/apiv2/dialogflowpb",
184184
protos = [":dialogflow_proto"],
185185
deps = [
186186
"//google/api:annotations_go_proto",
@@ -196,6 +196,7 @@ go_gapic_library(
196196
grpc_service_config = "dialogflow_grpc_service_config.json",
197197
importpath = "cloud.google.com/go/dialogflow/apiv2;dialogflow",
198198
metadata = True,
199+
release_level = "ga",
199200
rest_numeric_enums = True,
200201
service_yaml = "dialogflow_v2.yaml",
201202
transport = "grpc+rest",

google/cloud/dialogflow/v2/agent.proto

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import "google/protobuf/field_mask.proto";
2727

2828
option cc_enable_arenas = true;
2929
option csharp_namespace = "Google.Cloud.Dialogflow.V2";
30-
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
30+
option go_package = "cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb";
3131
option java_multiple_files = true;
3232
option java_outer_classname = "AgentProto";
3333
option java_package = "com.google.cloud.dialogflow.v2";
@@ -44,9 +44,7 @@ service Agents {
4444
rpc GetAgent(GetAgentRequest) returns (Agent) {
4545
option (google.api.http) = {
4646
get: "/v2/{parent=projects/*}/agent"
47-
additional_bindings {
48-
get: "/v2/{parent=projects/*/locations/*}/agent"
49-
}
47+
additional_bindings { get: "/v2/{parent=projects/*/locations/*}/agent" }
5048
};
5149
option (google.api.method_signature) = "parent";
5250
}
@@ -134,7 +132,8 @@ service Agents {
134132
//
135133
// - `metadata`: An empty [Struct
136134
// message](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#struct)
137-
// - `response`: [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
135+
// - `response`:
136+
// [ExportAgentResponse][google.cloud.dialogflow.v2.ExportAgentResponse]
138137
rpc ExportAgent(ExportAgentRequest) returns (google.longrunning.Operation) {
139138
option (google.api.http) = {
140139
post: "/v2/{parent=projects/*}/agent:export"
@@ -155,11 +154,13 @@ service Agents {
155154
//
156155
// Uploads new intents and entity types without deleting the existing ones.
157156
// Intents and entity types with the same name are replaced with the new
158-
// versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft
159-
// agent will be trained automatically (unless disabled in agent settings).
160-
// However, once the import is done, training may not be completed yet. Please
161-
// call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train
162-
// explicitly.
157+
// versions from
158+
// [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After
159+
// the import, the imported draft agent will be trained automatically (unless
160+
// disabled in agent settings). However, once the import is done, training may
161+
// not be completed yet. Please call
162+
// [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
163+
// operation it returns in order to train explicitly.
163164
//
164165
// This method is a [long-running
165166
// operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
@@ -197,8 +198,9 @@ service Agents {
197198
// entity types in the older version are deleted. After the restore, the
198199
// restored draft agent will be trained automatically (unless disabled in
199200
// agent settings). However, once the restore is done, training may not be
200-
// completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it
201-
// returns in order to train explicitly.
201+
// completed yet. Please call
202+
// [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the
203+
// operation it returns in order to train explicitly.
202204
//
203205
// This method is a [long-running
204206
// operation](https://cloud.google.com/dialogflow/es/docs/how/long-running-operations).
@@ -232,7 +234,8 @@ service Agents {
232234

233235
// Gets agent validation result. Agent validation is performed during
234236
// training time and is updated automatically when training is completed.
235-
rpc GetValidationResult(GetValidationResultRequest) returns (ValidationResult) {
237+
rpc GetValidationResult(GetValidationResultRequest)
238+
returns (ValidationResult) {
236239
option (google.api.http) = {
237240
get: "/v2/{parent=projects/*}/agent/validationResult"
238241
additional_bindings {
@@ -325,7 +328,8 @@ message Agent {
325328

326329
// Optional. The list of all languages supported by this agent (except for the
327330
// `default_language_code`).
328-
repeated string supported_language_codes = 4 [(google.api.field_behavior) = OPTIONAL];
331+
repeated string supported_language_codes = 4
332+
[(google.api.field_behavior) = OPTIONAL];
329333

330334
// Required. The time zone of this agent from the
331335
// [time zone database](https://www.iana.org/time-zones), e.g.,
@@ -347,10 +351,8 @@ message Agent {
347351
bool enable_logging = 8 [(google.api.field_behavior) = OPTIONAL];
348352

349353
// Optional. Determines how intents are detected from user queries.
350-
MatchMode match_mode = 9 [
351-
deprecated = true,
352-
(google.api.field_behavior) = OPTIONAL
353-
];
354+
MatchMode match_mode = 9
355+
[deprecated = true, (google.api.field_behavior) = OPTIONAL];
354356

355357
// Optional. To filter out false positive results and still get variety in
356358
// matched natural language inputs for your agent, you can tune the machine
@@ -371,7 +373,8 @@ message Agent {
371373
Tier tier = 15 [(google.api.field_behavior) = OPTIONAL];
372374
}
373375

374-
// The request message for [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent].
376+
// The request message for
377+
// [Agents.GetAgent][google.cloud.dialogflow.v2.Agents.GetAgent].
375378
message GetAgentRequest {
376379
// Required. The project that the agent to fetch is associated with.
377380
// Format: `projects/<Project ID>`.
@@ -383,16 +386,19 @@ message GetAgentRequest {
383386
];
384387
}
385388

386-
// The request message for [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent].
389+
// The request message for
390+
// [Agents.SetAgent][google.cloud.dialogflow.v2.Agents.SetAgent].
387391
message SetAgentRequest {
388392
// Required. The agent to update.
389393
Agent agent = 1 [(google.api.field_behavior) = REQUIRED];
390394

391395
// Optional. The mask to control which fields get updated.
392-
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = OPTIONAL];
396+
google.protobuf.FieldMask update_mask = 2
397+
[(google.api.field_behavior) = OPTIONAL];
393398
}
394399

395-
// The request message for [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent].
400+
// The request message for
401+
// [Agents.DeleteAgent][google.cloud.dialogflow.v2.Agents.DeleteAgent].
396402
message DeleteAgentRequest {
397403
// Required. The project that the agent to delete is associated with.
398404
// Format: `projects/<Project ID>`.
@@ -404,7 +410,8 @@ message DeleteAgentRequest {
404410
];
405411
}
406412

407-
// The request message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
413+
// The request message for
414+
// [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
408415
message SearchAgentsRequest {
409416
// Required. The project to list agents from.
410417
// Format: `projects/<Project ID or '-'>`.
@@ -423,7 +430,8 @@ message SearchAgentsRequest {
423430
string page_token = 3;
424431
}
425432

426-
// The response message for [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
433+
// The response message for
434+
// [Agents.SearchAgents][google.cloud.dialogflow.v2.Agents.SearchAgents].
427435
message SearchAgentsResponse {
428436
// The list of agents. There will be a maximum number of items returned based
429437
// on the page_size field in the request.
@@ -434,7 +442,8 @@ message SearchAgentsResponse {
434442
string next_page_token = 2;
435443
}
436444

437-
// The request message for [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent].
445+
// The request message for
446+
// [Agents.TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent].
438447
message TrainAgentRequest {
439448
// Required. The project that the agent to train is associated with.
440449
// Format: `projects/<Project ID>`.
@@ -446,7 +455,8 @@ message TrainAgentRequest {
446455
];
447456
}
448457

449-
// The request message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
458+
// The request message for
459+
// [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
450460
message ExportAgentRequest {
451461
// Required. The project that the agent to export is associated with.
452462
// Format: `projects/<Project ID>`.
@@ -457,10 +467,10 @@ message ExportAgentRequest {
457467
}
458468
];
459469

460-
// Required. The [Google Cloud Storage](https://cloud.google.com/storage/docs/)
461-
// URI to export the agent to.
462-
// The format of this URI must be `gs://<bucket-name>/<object-name>`.
463-
// If left unspecified, the serialized agent is returned inline.
470+
// Required. The [Google Cloud
471+
// Storage](https://cloud.google.com/storage/docs/) URI to export the agent
472+
// to. The format of this URI must be `gs://<bucket-name>/<object-name>`. If
473+
// left unspecified, the serialized agent is returned inline.
464474
//
465475
// Dialogflow performs a write operation for the Cloud Storage object
466476
// on the caller's behalf, so your request authentication must
@@ -470,7 +480,8 @@ message ExportAgentRequest {
470480
string agent_uri = 2 [(google.api.field_behavior) = REQUIRED];
471481
}
472482

473-
// The response message for [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
483+
// The response message for
484+
// [Agents.ExportAgent][google.cloud.dialogflow.v2.Agents.ExportAgent].
474485
message ExportAgentResponse {
475486
// The exported agent.
476487
oneof agent {
@@ -483,7 +494,8 @@ message ExportAgentResponse {
483494
}
484495
}
485496

486-
// The request message for [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent].
497+
// The request message for
498+
// [Agents.ImportAgent][google.cloud.dialogflow.v2.Agents.ImportAgent].
487499
message ImportAgentRequest {
488500
// Required. The project that the agent to import is associated with.
489501
// Format: `projects/<Project ID>`.
@@ -511,7 +523,8 @@ message ImportAgentRequest {
511523
}
512524
}
513525

514-
// The request message for [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent].
526+
// The request message for
527+
// [Agents.RestoreAgent][google.cloud.dialogflow.v2.Agents.RestoreAgent].
515528
message RestoreAgentRequest {
516529
// Required. The project that the agent to restore is associated with.
517530
// Format: `projects/<Project ID>`.
@@ -539,7 +552,8 @@ message RestoreAgentRequest {
539552
}
540553
}
541554

542-
// The request message for [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult].
555+
// The request message for
556+
// [Agents.GetValidationResult][google.cloud.dialogflow.v2.Agents.GetValidationResult].
543557
message GetValidationResultRequest {
544558
// Required. The project that the agent is associated with.
545559
// Format: `projects/<Project ID>`.

google/cloud/dialogflow/v2/answer_record.proto

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,14 @@ import "google/protobuf/timestamp.proto";
2626

2727
option cc_enable_arenas = true;
2828
option csharp_namespace = "Google.Cloud.Dialogflow.V2";
29-
option go_package = "google.golang.org/genproto/googleapis/cloud/dialogflow/v2;dialogflow";
29+
option go_package = "cloud.google.com/go/dialogflow/apiv2/dialogflowpb;dialogflowpb";
3030
option java_multiple_files = true;
3131
option java_outer_classname = "AnswerRecordsProto";
3232
option java_package = "com.google.cloud.dialogflow.v2";
3333
option objc_class_prefix = "DF";
3434

35-
// Service for managing [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord].
35+
// Service for managing
36+
// [AnswerRecords][google.cloud.dialogflow.v2.AnswerRecord].
3637
service AnswerRecords {
3738
option (google.api.default_host) = "dialogflow.googleapis.com";
3839
option (google.api.oauth_scopes) =
@@ -41,7 +42,8 @@ service AnswerRecords {
4142

4243
// Returns the list of all answer records in the specified project in reverse
4344
// chronological order.
44-
rpc ListAnswerRecords(ListAnswerRecordsRequest) returns (ListAnswerRecordsResponse) {
45+
rpc ListAnswerRecords(ListAnswerRecordsRequest)
46+
returns (ListAnswerRecordsResponse) {
4547
option (google.api.http) = {
4648
get: "/v2/{parent=projects/*}/answerRecords"
4749
additional_bindings {
@@ -86,9 +88,11 @@ service AnswerRecords {
8688
// A typical workflow for customers provide feedback to an answer is:
8789
//
8890
// 1. For human agent assistant, customers get suggestion via ListSuggestions
89-
// API. Together with the answers, [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] are returned to the
90-
// customers.
91-
// 2. The customer uses the [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the
91+
// API. Together with the answers,
92+
// [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] are
93+
// returned to the customers.
94+
// 2. The customer uses the
95+
// [AnswerRecord.name][google.cloud.dialogflow.v2.AnswerRecord.name] to call the
9296
// [UpdateAnswerRecord][] method to send feedback about a specific answer
9397
// that they believe is wrong.
9498
message AnswerRecord {
@@ -104,18 +108,20 @@ message AnswerRecord {
104108
string name = 1;
105109

106110
// Required. The AnswerFeedback for this record. You can set this with
107-
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord] in order to give us feedback about
108-
// this answer.
111+
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord]
112+
// in order to give us feedback about this answer.
109113
AnswerFeedback answer_feedback = 2 [(google.api.field_behavior) = REQUIRED];
110114

111115
// The record for this answer.
112116
oneof record {
113117
// Output only. The record for human agent assistant.
114-
AgentAssistantRecord agent_assistant_record = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
118+
AgentAssistantRecord agent_assistant_record = 4
119+
[(google.api.field_behavior) = OUTPUT_ONLY];
115120
}
116121
}
117122

118-
// Request message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
123+
// Request message for
124+
// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
119125
message ListAnswerRecordsRequest {
120126
// Required. The project to list all answer records for in reverse
121127
// chronological order. Format: `projects/<Project ID>/locations/<Location
@@ -133,10 +139,7 @@ message ListAnswerRecordsRequest {
133139
//
134140
// For more information about filtering, see
135141
// [API Filtering](https://aip.dev/160).
136-
string filter = 2 [
137-
deprecated = true,
138-
(google.api.field_behavior) = OPTIONAL
139-
];
142+
string filter = 2 [deprecated = true, (google.api.field_behavior) = OPTIONAL];
140143

141144
// Optional. The maximum number of records to return in a single page.
142145
// The server may return fewer records than this. If unspecified, we use 10.
@@ -150,7 +153,8 @@ message ListAnswerRecordsRequest {
150153
string page_token = 4 [(google.api.field_behavior) = OPTIONAL];
151154
}
152155

153-
// Response message for [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
156+
// Response message for
157+
// [AnswerRecords.ListAnswerRecords][google.cloud.dialogflow.v2.AnswerRecords.ListAnswerRecords].
154158
message ListAnswerRecordsResponse {
155159
// The list of answer records.
156160
repeated AnswerRecord answer_records = 1;
@@ -164,13 +168,15 @@ message ListAnswerRecordsResponse {
164168
string next_page_token = 2;
165169
}
166170

167-
// Request message for [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord].
171+
// Request message for
172+
// [AnswerRecords.UpdateAnswerRecord][google.cloud.dialogflow.v2.AnswerRecords.UpdateAnswerRecord].
168173
message UpdateAnswerRecordRequest {
169174
// Required. Answer record to update.
170175
AnswerRecord answer_record = 1 [(google.api.field_behavior) = REQUIRED];
171176

172177
// Required. The mask to control which fields get updated.
173-
google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED];
178+
google.protobuf.FieldMask update_mask = 2
179+
[(google.api.field_behavior) = REQUIRED];
174180
}
175181

176182
// Represents feedback the customer has about the quality & correctness of a
@@ -253,6 +259,18 @@ message AgentAssistantFeedback {
253259
EFFICIENT = 2;
254260
}
255261

262+
// Feedback for conversation summarization.
263+
message SummarizationFeedback {
264+
// Timestamp when composing of the summary starts.
265+
google.protobuf.Timestamp start_time = 1;
266+
267+
// Timestamp when the summary was submitted.
268+
google.protobuf.Timestamp submit_time = 2;
269+
270+
// Text of actual submitted summary.
271+
string summary_text = 3;
272+
}
273+
256274
// Optional. Whether or not the suggested answer is relevant.
257275
//
258276
// For example:
@@ -272,21 +290,30 @@ message AgentAssistantFeedback {
272290
// days of the purchase date."
273291
// * Ground truth: "No return or exchange is allowed."
274292
// * [document_correctness]: INCORRECT
275-
DocumentCorrectness document_correctness = 2 [(google.api.field_behavior) = OPTIONAL];
293+
DocumentCorrectness document_correctness = 2
294+
[(google.api.field_behavior) = OPTIONAL];
276295

277296
// Optional. Whether or not the suggested document is efficient. For example,
278297
// if the document is poorly written, hard to understand, hard to use or
279-
// too long to find useful information, [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency] is
298+
// too long to find useful information,
299+
// [document_efficiency][google.cloud.dialogflow.v2.AgentAssistantFeedback.document_efficiency]
300+
// is
280301
// [DocumentEfficiency.INEFFICIENT][google.cloud.dialogflow.v2.AgentAssistantFeedback.DocumentEfficiency.INEFFICIENT].
281-
DocumentEfficiency document_efficiency = 3 [(google.api.field_behavior) = OPTIONAL];
302+
DocumentEfficiency document_efficiency = 3
303+
[(google.api.field_behavior) = OPTIONAL];
304+
305+
// Optional. Feedback for conversation summarization.
306+
SummarizationFeedback summarization_feedback = 4
307+
[(google.api.field_behavior) = OPTIONAL];
282308
}
283309

284310
// Represents a record of a human agent assist answer.
285311
message AgentAssistantRecord {
286312
// Output only. The agent assist answer.
287313
oneof answer {
288314
// Output only. The article suggestion answer.
289-
ArticleAnswer article_suggestion_answer = 5 [(google.api.field_behavior) = OUTPUT_ONLY];
315+
ArticleAnswer article_suggestion_answer = 5
316+
[(google.api.field_behavior) = OUTPUT_ONLY];
290317

291318
// Output only. The FAQ answer.
292319
FaqAnswer faq_answer = 6 [(google.api.field_behavior) = OUTPUT_ONLY];

0 commit comments

Comments
 (0)