@google-cloud/discoveryengine 1.5.0 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (138) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +24 -0
  3. package/build/protos/google/cloud/discoveryengine/v1/common.proto +13 -1
  4. package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +5 -0
  5. package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +17 -0
  6. package/build/protos/google/cloud/discoveryengine/v1/document.proto +9 -0
  7. package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +6 -0
  8. package/build/protos/google/cloud/discoveryengine/v1/engine.proto +2 -2
  9. package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +284 -22
  10. package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +3 -0
  11. package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +228 -0
  12. package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +125 -21
  13. package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +16 -11
  14. package/build/protos/google/cloud/discoveryengine/v1alpha/answer.proto +328 -0
  15. package/build/protos/google/cloud/discoveryengine/v1alpha/chunk.proto +6 -0
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +1 -1
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +574 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +3 -6
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +2 -2
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +120 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +55 -0
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +7 -39
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +102 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +171 -0
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +21 -0
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +7 -3
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +4 -1
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +94 -0
  29. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +1 -1
  30. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +328 -0
  31. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +30 -1
  32. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +559 -0
  33. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +3 -6
  34. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +6 -0
  35. package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +2 -2
  36. package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +93 -0
  37. package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +120 -0
  38. package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +55 -0
  39. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +283 -24
  40. package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +115 -0
  41. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +142 -22
  42. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +7 -1
  43. package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +94 -0
  44. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +1 -1
  45. package/build/protos/protos.d.ts +41126 -24558
  46. package/build/protos/protos.js +134286 -93661
  47. package/build/protos/protos.json +7598 -3744
  48. package/build/src/index.d.ts +4 -1
  49. package/build/src/index.js +4 -1
  50. package/build/src/v1/conversational_search_service_client.d.ts +4 -0
  51. package/build/src/v1/document_service_client.d.ts +47 -19
  52. package/build/src/v1/index.d.ts +1 -0
  53. package/build/src/v1/index.js +3 -1
  54. package/build/src/v1/recommendation_service_client.d.ts +1087 -0
  55. package/build/src/v1/recommendation_service_client.js +1432 -0
  56. package/build/src/v1/recommendation_service_client_config.json +43 -0
  57. package/build/src/v1/search_service_client.d.ts +27 -9
  58. package/build/src/v1/search_service_client.js +18 -6
  59. package/build/src/v1/search_service_client_config.json +5 -5
  60. package/build/src/v1alpha/acl_config_service_client.d.ts +330 -0
  61. package/build/src/v1alpha/acl_config_service_client.js +454 -0
  62. package/build/src/v1alpha/chunk_service_client.d.ts +330 -0
  63. package/build/src/v1alpha/chunk_service_client.js +454 -0
  64. package/build/src/v1alpha/completion_service_client.d.ts +330 -0
  65. package/build/src/v1alpha/completion_service_client.js +454 -0
  66. package/build/src/v1alpha/conversational_search_service_client.d.ts +674 -0
  67. package/build/src/v1alpha/conversational_search_service_client.js +724 -0
  68. package/build/src/v1alpha/conversational_search_service_client_config.json +35 -0
  69. package/build/src/v1alpha/data_store_service_client.d.ts +330 -0
  70. package/build/src/v1alpha/data_store_service_client.js +454 -0
  71. package/build/src/v1alpha/document_service_client.d.ts +330 -0
  72. package/build/src/v1alpha/document_service_client.js +454 -0
  73. package/build/src/v1alpha/engine_service_client.d.ts +330 -0
  74. package/build/src/v1alpha/engine_service_client.js +454 -0
  75. package/build/src/v1alpha/estimate_billing_service_client.d.ts +330 -0
  76. package/build/src/v1alpha/estimate_billing_service_client.js +454 -0
  77. package/build/src/v1alpha/grounded_generation_service_client.d.ts +1574 -0
  78. package/build/src/v1alpha/grounded_generation_service_client.js +2248 -0
  79. package/build/src/v1alpha/grounded_generation_service_client_config.json +43 -0
  80. package/build/src/v1alpha/index.d.ts +2 -0
  81. package/build/src/v1alpha/index.js +5 -1
  82. package/build/src/v1alpha/project_service_client.d.ts +1756 -0
  83. package/build/src/v1alpha/project_service_client.js +2500 -0
  84. package/build/src/v1alpha/project_service_client_config.json +38 -0
  85. package/build/src/v1alpha/rank_service_client.d.ts +330 -0
  86. package/build/src/v1alpha/rank_service_client.js +454 -0
  87. package/build/src/v1alpha/rank_service_client_config.json +15 -2
  88. package/build/src/v1alpha/recommendation_service_client.d.ts +330 -0
  89. package/build/src/v1alpha/recommendation_service_client.js +454 -0
  90. package/build/src/v1alpha/schema_service_client.d.ts +330 -0
  91. package/build/src/v1alpha/schema_service_client.js +454 -0
  92. package/build/src/v1alpha/search_service_client.d.ts +330 -0
  93. package/build/src/v1alpha/search_service_client.js +454 -0
  94. package/build/src/v1alpha/search_service_client_config.json +5 -5
  95. package/build/src/v1alpha/search_tuning_service_client.d.ts +330 -0
  96. package/build/src/v1alpha/search_tuning_service_client.js +454 -0
  97. package/build/src/v1alpha/serving_config_service_client.d.ts +315 -0
  98. package/build/src/v1alpha/serving_config_service_client.js +432 -0
  99. package/build/src/v1alpha/site_search_engine_service_client.d.ts +330 -0
  100. package/build/src/v1alpha/site_search_engine_service_client.js +454 -0
  101. package/build/src/v1alpha/user_event_service_client.d.ts +330 -0
  102. package/build/src/v1alpha/user_event_service_client.js +454 -0
  103. package/build/src/v1beta/completion_service_client.d.ts +315 -0
  104. package/build/src/v1beta/completion_service_client.js +432 -0
  105. package/build/src/v1beta/conversational_search_service_client.d.ts +659 -0
  106. package/build/src/v1beta/conversational_search_service_client.js +702 -0
  107. package/build/src/v1beta/conversational_search_service_client_config.json +35 -0
  108. package/build/src/v1beta/data_store_service_client.d.ts +315 -0
  109. package/build/src/v1beta/data_store_service_client.js +432 -0
  110. package/build/src/v1beta/document_service_client.d.ts +361 -21
  111. package/build/src/v1beta/document_service_client.js +432 -0
  112. package/build/src/v1beta/engine_service_client.d.ts +410 -0
  113. package/build/src/v1beta/engine_service_client.js +518 -0
  114. package/build/src/v1beta/engine_service_client_config.json +12 -0
  115. package/build/src/v1beta/grounded_generation_service_client.d.ts +1406 -0
  116. package/build/src/v1beta/grounded_generation_service_client.js +2014 -0
  117. package/build/src/v1beta/grounded_generation_service_client_config.json +43 -0
  118. package/build/src/v1beta/index.d.ts +2 -0
  119. package/build/src/v1beta/index.js +5 -1
  120. package/build/src/v1beta/rank_service_client.d.ts +1416 -0
  121. package/build/src/v1beta/rank_service_client.js +2015 -0
  122. package/build/src/v1beta/rank_service_client_config.json +43 -0
  123. package/build/src/v1beta/recommendation_service_client.d.ts +315 -0
  124. package/build/src/v1beta/recommendation_service_client.js +432 -0
  125. package/build/src/v1beta/schema_service_client.d.ts +315 -0
  126. package/build/src/v1beta/schema_service_client.js +432 -0
  127. package/build/src/v1beta/search_service_client.d.ts +342 -12
  128. package/build/src/v1beta/search_service_client.js +450 -8
  129. package/build/src/v1beta/search_service_client_config.json +5 -5
  130. package/build/src/v1beta/search_tuning_service_client.d.ts +315 -0
  131. package/build/src/v1beta/search_tuning_service_client.js +432 -0
  132. package/build/src/v1beta/serving_config_service_client.d.ts +315 -0
  133. package/build/src/v1beta/serving_config_service_client.js +432 -0
  134. package/build/src/v1beta/site_search_engine_service_client.d.ts +315 -0
  135. package/build/src/v1beta/site_search_engine_service_client.js +432 -0
  136. package/build/src/v1beta/user_event_service_client.d.ts +315 -0
  137. package/build/src/v1beta/user_event_service_client.js +432 -0
  138. package/package.json +1 -1
@@ -20,8 +20,10 @@ import "google/api/annotations.proto";
20
20
  import "google/api/client.proto";
21
21
  import "google/api/field_behavior.proto";
22
22
  import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1beta/answer.proto";
23
24
  import "google/cloud/discoveryengine/v1beta/conversation.proto";
24
25
  import "google/cloud/discoveryengine/v1beta/search_service.proto";
26
+ import "google/cloud/discoveryengine/v1beta/session.proto";
25
27
  import "google/protobuf/empty.proto";
26
28
  import "google/protobuf/field_mask.proto";
27
29
 
@@ -147,6 +149,123 @@ service ConversationalSearchService {
147
149
  };
148
150
  option (google.api.method_signature) = "parent";
149
151
  }
152
+
153
+ // Answer query method.
154
+ rpc AnswerQuery(AnswerQueryRequest) returns (AnswerQueryResponse) {
155
+ option (google.api.http) = {
156
+ post: "/v1beta/{serving_config=projects/*/locations/*/dataStores/*/servingConfigs/*}:answer"
157
+ body: "*"
158
+ additional_bindings {
159
+ post: "/v1beta/{serving_config=projects/*/locations/*/collections/*/dataStores/*/servingConfigs/*}:answer"
160
+ body: "*"
161
+ }
162
+ additional_bindings {
163
+ post: "/v1beta/{serving_config=projects/*/locations/*/collections/*/engines/*/servingConfigs/*}:answer"
164
+ body: "*"
165
+ }
166
+ };
167
+ }
168
+
169
+ // Gets a Answer.
170
+ rpc GetAnswer(GetAnswerRequest) returns (Answer) {
171
+ option (google.api.http) = {
172
+ get: "/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*/answers/*}"
173
+ additional_bindings {
174
+ get: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*/answers/*}"
175
+ }
176
+ additional_bindings {
177
+ get: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*/answers/*}"
178
+ }
179
+ };
180
+ option (google.api.method_signature) = "name";
181
+ }
182
+
183
+ // Creates a Session.
184
+ //
185
+ // If the [Session][google.cloud.discoveryengine.v1beta.Session] to create
186
+ // already exists, an ALREADY_EXISTS error is returned.
187
+ rpc CreateSession(CreateSessionRequest) returns (Session) {
188
+ option (google.api.http) = {
189
+ post: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessions"
190
+ body: "session"
191
+ additional_bindings {
192
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions"
193
+ body: "session"
194
+ }
195
+ additional_bindings {
196
+ post: "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions"
197
+ body: "session"
198
+ }
199
+ };
200
+ option (google.api.method_signature) = "parent,session";
201
+ }
202
+
203
+ // Deletes a Session.
204
+ //
205
+ // If the [Session][google.cloud.discoveryengine.v1beta.Session] to delete
206
+ // does not exist, a NOT_FOUND error is returned.
207
+ rpc DeleteSession(DeleteSessionRequest) returns (google.protobuf.Empty) {
208
+ option (google.api.http) = {
209
+ delete: "/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}"
210
+ additional_bindings {
211
+ delete: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}"
212
+ }
213
+ additional_bindings {
214
+ delete: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}"
215
+ }
216
+ };
217
+ option (google.api.method_signature) = "name";
218
+ }
219
+
220
+ // Updates a Session.
221
+ //
222
+ // [Session][google.cloud.discoveryengine.v1beta.Session] action type cannot
223
+ // be changed. If the [Session][google.cloud.discoveryengine.v1beta.Session]
224
+ // to update does not exist, a NOT_FOUND error is returned.
225
+ rpc UpdateSession(UpdateSessionRequest) returns (Session) {
226
+ option (google.api.http) = {
227
+ patch: "/v1beta/{session.name=projects/*/locations/*/dataStores/*/sessions/*}"
228
+ body: "session"
229
+ additional_bindings {
230
+ patch: "/v1beta/{session.name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}"
231
+ body: "session"
232
+ }
233
+ additional_bindings {
234
+ patch: "/v1beta/{session.name=projects/*/locations/*/collections/*/engines/*/sessions/*}"
235
+ body: "session"
236
+ }
237
+ };
238
+ option (google.api.method_signature) = "session,update_mask";
239
+ }
240
+
241
+ // Gets a Session.
242
+ rpc GetSession(GetSessionRequest) returns (Session) {
243
+ option (google.api.http) = {
244
+ get: "/v1beta/{name=projects/*/locations/*/dataStores/*/sessions/*}"
245
+ additional_bindings {
246
+ get: "/v1beta/{name=projects/*/locations/*/collections/*/dataStores/*/sessions/*}"
247
+ }
248
+ additional_bindings {
249
+ get: "/v1beta/{name=projects/*/locations/*/collections/*/engines/*/sessions/*}"
250
+ }
251
+ };
252
+ option (google.api.method_signature) = "name";
253
+ }
254
+
255
+ // Lists all Sessions by their parent
256
+ // [DataStore][google.cloud.discoveryengine.v1beta.DataStore].
257
+ rpc ListSessions(ListSessionsRequest) returns (ListSessionsResponse) {
258
+ option (google.api.http) = {
259
+ get: "/v1beta/{parent=projects/*/locations/*/dataStores/*}/sessions"
260
+ additional_bindings {
261
+ get: "/v1beta/{parent=projects/*/locations/*/collections/*/dataStores/*}/sessions"
262
+ }
263
+ additional_bindings {
264
+ get: "/v1beta/{parent=projects/*/locations/*/collections/*/engines/*}/sessions"
265
+ }
266
+ };
267
+ option (google.api.method_signature) = "parent";
268
+ }
150
269
  }
151
270
 
152
271
  // Request message for
@@ -348,3 +467,443 @@ message ListConversationsResponse {
348
467
  // Pagination token, if not returned indicates the last page.
349
468
  string next_page_token = 2;
350
469
  }
470
+
471
+ // Request message for
472
+ // [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery]
473
+ // method.
474
+ message AnswerQueryRequest {
475
+ // Safety specification.
476
+ message SafetySpec {
477
+ // Enable the safety filtering on the answer response. It is false by
478
+ // default.
479
+ bool enable = 1;
480
+ }
481
+
482
+ // Related questions specification.
483
+ message RelatedQuestionsSpec {
484
+ // Enable related questions feature if true.
485
+ bool enable = 1;
486
+ }
487
+
488
+ // Answer generation specification.
489
+ message AnswerGenerationSpec {
490
+ // Answer Generation Model specification.
491
+ message ModelSpec {
492
+ // Model version. If not set, it will use the default stable model.
493
+ // Allowed values are: stable, preview.
494
+ string model_version = 1;
495
+ }
496
+
497
+ // Answer generation prompt specification.
498
+ message PromptSpec {
499
+ // Customized preamble.
500
+ string preamble = 1;
501
+ }
502
+
503
+ // Answer generation model specification.
504
+ ModelSpec model_spec = 1;
505
+
506
+ // Answer generation prompt specification.
507
+ PromptSpec prompt_spec = 2;
508
+
509
+ // Specifies whether to include citation metadata in the answer. The default
510
+ // value is `false`.
511
+ bool include_citations = 3;
512
+
513
+ // Language code for Answer. Use language tags defined by
514
+ // [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
515
+ // Note: This is an experimental feature.
516
+ string answer_language_code = 4;
517
+
518
+ // Specifies whether to filter out adversarial queries. The default value
519
+ // is `false`.
520
+ //
521
+ // Google employs search-query classification to detect adversarial
522
+ // queries. No answer is returned if the search query is classified as an
523
+ // adversarial query. For example, a user might ask a question regarding
524
+ // negative comments about the company or submit a query designed to
525
+ // generate unsafe, policy-violating output. If this field is set to
526
+ // `true`, we skip generating answers for adversarial queries and return
527
+ // fallback messages instead.
528
+ bool ignore_adversarial_query = 5;
529
+
530
+ // Specifies whether to filter out queries that are not answer-seeking.
531
+ // The default value is `false`.
532
+ //
533
+ // Google employs search-query classification to detect answer-seeking
534
+ // queries. No answer is returned if the search query is classified as a
535
+ // non-answer seeking query. If this field is set to `true`, we skip
536
+ // generating answers for non-answer seeking queries and return
537
+ // fallback messages instead.
538
+ bool ignore_non_answer_seeking_query = 6;
539
+ }
540
+
541
+ // Search specification.
542
+ message SearchSpec {
543
+ // Search parameters.
544
+ message SearchParams {
545
+ // Number of search results to return.
546
+ // The default value is 10.
547
+ int32 max_return_results = 1;
548
+
549
+ // The filter syntax consists of an expression language for constructing
550
+ // a predicate from one or more fields of the documents being filtered.
551
+ // Filter expression is case-sensitive. This will be used to filter
552
+ // search results which may affect the Answer response.
553
+ //
554
+ // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
555
+ //
556
+ // Filtering in Vertex AI Search is done by mapping the LHS filter key
557
+ // to a key property defined in the Vertex AI Search backend -- this
558
+ // mapping is defined by the customer in their schema. For example a
559
+ // media customers might have a field 'name' in their schema. In this
560
+ // case the filter would look like this: filter --> name:'ANY("king
561
+ // kong")'
562
+ //
563
+ // For more information about filtering including syntax and filter
564
+ // operators, see
565
+ // [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
566
+ string filter = 2;
567
+
568
+ // Boost specification to boost certain documents in search results which
569
+ // may affect the answer query response. For more information on boosting,
570
+ // see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
571
+ SearchRequest.BoostSpec boost_spec = 3;
572
+
573
+ // The order in which documents are returned. Documents can be ordered
574
+ // by a field in an
575
+ // [Document][google.cloud.discoveryengine.v1beta.Document] object. Leave
576
+ // it unset if ordered by relevance. `order_by` expression is
577
+ // case-sensitive. For more information on ordering, see
578
+ // [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
579
+ //
580
+ // If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
581
+ string order_by = 4;
582
+ }
583
+
584
+ // Search result list.
585
+ message SearchResultList {
586
+ // Search result.
587
+ message SearchResult {
588
+ // Unstructured document information.
589
+ message UnstructuredDocumentInfo {
590
+ // Document context.
591
+ message DocumentContext {
592
+ // Page identifier.
593
+ string page_identifier = 1;
594
+
595
+ // Document content.
596
+ string content = 2;
597
+ }
598
+
599
+ // Extractive segment.
600
+ // [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
601
+ message ExtractiveSegment {
602
+ // Page identifier.
603
+ string page_identifier = 1;
604
+
605
+ // Extractive segment content.
606
+ string content = 2;
607
+ }
608
+
609
+ // Extractive answer.
610
+ // [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
611
+ message ExtractiveAnswer {
612
+ // Page identifier.
613
+ string page_identifier = 1;
614
+
615
+ // Extractive answer content.
616
+ string content = 2;
617
+ }
618
+
619
+ // Document resource name.
620
+ string document = 1 [(google.api.resource_reference) = {
621
+ type: "discoveryengine.googleapis.com/Document"
622
+ }];
623
+
624
+ // URI for the document.
625
+ string uri = 2;
626
+
627
+ // Title.
628
+ string title = 3;
629
+
630
+ // List of document contexts.
631
+ repeated DocumentContext document_contexts = 4;
632
+
633
+ // List of extractive segments.
634
+ repeated ExtractiveSegment extractive_segments = 5;
635
+
636
+ // List of extractive answers.
637
+ repeated ExtractiveAnswer extractive_answers = 6;
638
+ }
639
+
640
+ // Chunk information.
641
+ message ChunkInfo {
642
+ // Chunk resource name.
643
+ string chunk = 1 [(google.api.resource_reference) = {
644
+ type: "discoveryengine.googleapis.com/Chunk"
645
+ }];
646
+
647
+ // Chunk textual content.
648
+ string content = 2;
649
+ }
650
+
651
+ // Search result content.
652
+ oneof content {
653
+ // Unstructured document information.
654
+ UnstructuredDocumentInfo unstructured_document_info = 1;
655
+
656
+ // Chunk information.
657
+ ChunkInfo chunk_info = 2;
658
+ }
659
+ }
660
+
661
+ // Search results.
662
+ repeated SearchResult search_results = 1;
663
+ }
664
+
665
+ // Search parameters to control the search behavior.
666
+ // Or provide search result list to generate answer.
667
+ oneof input {
668
+ // Search parameters.
669
+ SearchParams search_params = 1;
670
+
671
+ // Search result list.
672
+ SearchResultList search_result_list = 2;
673
+ }
674
+ }
675
+
676
+ // Query understanding specification.
677
+ message QueryUnderstandingSpec {
678
+ // Query classification specification.
679
+ message QueryClassificationSpec {
680
+ // Query classification types.
681
+ enum Type {
682
+ // Unspecified query classification type.
683
+ TYPE_UNSPECIFIED = 0;
684
+
685
+ // Adversarial query classification type.
686
+ ADVERSARIAL_QUERY = 1;
687
+
688
+ // Non-answer-seeking query classification type.
689
+ NON_ANSWER_SEEKING_QUERY = 2;
690
+ }
691
+
692
+ // Enabled query classification types.
693
+ repeated Type types = 1;
694
+ }
695
+
696
+ // Query rephraser specification.
697
+ message QueryRephraserSpec {
698
+ // Disable query rephraser.
699
+ bool disable = 1;
700
+
701
+ // Max rephrase steps.
702
+ // The max number is 10 steps.
703
+ // If not set or set to < 1, it will be set to 1 by default.
704
+ int32 max_rephrase_steps = 2;
705
+ }
706
+
707
+ // Query classification specification.
708
+ QueryClassificationSpec query_classification_spec = 1;
709
+
710
+ // Query rephraser specification.
711
+ QueryRephraserSpec query_rephraser_spec = 2;
712
+ }
713
+
714
+ // Required. The resource name of the Search serving config, such as
715
+ // `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
716
+ // or
717
+ // `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`.
718
+ // This field is used to identify the serving configuration name, set
719
+ // of models used to make the search.
720
+ string serving_config = 1 [
721
+ (google.api.field_behavior) = REQUIRED,
722
+ (google.api.resource_reference) = {
723
+ type: "discoveryengine.googleapis.com/ServingConfig"
724
+ }
725
+ ];
726
+
727
+ // Required. Current user query.
728
+ Query query = 2 [(google.api.field_behavior) = REQUIRED];
729
+
730
+ // The session resource name. Not required.
731
+ //
732
+ // When session field is not set, the API is in sessionless mode.
733
+ //
734
+ // We support auto session mode: users can use the wildcard symbol “-” as
735
+ // session id. A new id will be automatically generated and assigned.
736
+ string session = 3 [(google.api.resource_reference) = {
737
+ type: "discoveryengine.googleapis.com/Session"
738
+ }];
739
+
740
+ // Model specification.
741
+ SafetySpec safety_spec = 4;
742
+
743
+ // Related questions specification.
744
+ RelatedQuestionsSpec related_questions_spec = 5;
745
+
746
+ // Answer generation specification.
747
+ AnswerGenerationSpec answer_generation_spec = 7;
748
+
749
+ // Search specification.
750
+ SearchSpec search_spec = 8;
751
+
752
+ // Query understanding specification.
753
+ QueryUnderstandingSpec query_understanding_spec = 9;
754
+
755
+ // Asynchronous mode control.
756
+ //
757
+ // If enabled, the response will be returned with answer/session resource
758
+ // name without final answer. The API users need to do the polling to get
759
+ // the latest status of answer/session by calling
760
+ // [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer]
761
+ // or
762
+ // [ConversationalSearchService.GetSession][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetSession]
763
+ // method.
764
+ bool asynchronous_mode = 10;
765
+
766
+ // A unique identifier for tracking visitors. For example, this could be
767
+ // implemented with an HTTP cookie, which should be able to uniquely identify
768
+ // a visitor on a single device. This unique identifier should not change if
769
+ // the visitor logs in or out of the website.
770
+ //
771
+ // This field should NOT have a fixed value such as `unknown_visitor`.
772
+ //
773
+ // The field must be a UTF-8 encoded string with a length limit of 128
774
+ // characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
775
+ string user_pseudo_id = 12;
776
+ }
777
+
778
+ // Response message for
779
+ // [ConversationalSearchService.AnswerQuery][google.cloud.discoveryengine.v1beta.ConversationalSearchService.AnswerQuery]
780
+ // method.
781
+ message AnswerQueryResponse {
782
+ // Answer resource object.
783
+ // If [AnswerQueryRequest.StepSpec.max_step_count][] is greater than 1,
784
+ // use [Answer.name][google.cloud.discoveryengine.v1beta.Answer.name] to fetch
785
+ // answer information using
786
+ // [ConversationalSearchService.GetAnswer][google.cloud.discoveryengine.v1beta.ConversationalSearchService.GetAnswer]
787
+ // API.
788
+ Answer answer = 1;
789
+
790
+ // Session resource object.
791
+ // It will be only available when session field is set and valid in the
792
+ // [AnswerQueryRequest][google.cloud.discoveryengine.v1beta.AnswerQueryRequest]
793
+ // request.
794
+ Session session = 2;
795
+ }
796
+
797
+ // Request for GetAnswer method.
798
+ message GetAnswerRequest {
799
+ // Required. The resource name of the Answer to get. Format:
800
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`
801
+ string name = 1 [
802
+ (google.api.field_behavior) = REQUIRED,
803
+ (google.api.resource_reference) = {
804
+ type: "discoveryengine.googleapis.com/Answer"
805
+ }
806
+ ];
807
+ }
808
+
809
+ // Request for CreateSession method.
810
+ message CreateSessionRequest {
811
+ // Required. Full resource name of parent data store. Format:
812
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
813
+ string parent = 1 [
814
+ (google.api.field_behavior) = REQUIRED,
815
+ (google.api.resource_reference) = {
816
+ type: "discoveryengine.googleapis.com/DataStore"
817
+ }
818
+ ];
819
+
820
+ // Required. The session to create.
821
+ Session session = 2 [(google.api.field_behavior) = REQUIRED];
822
+ }
823
+
824
+ // Request for UpdateSession method.
825
+ message UpdateSessionRequest {
826
+ // Required. The Session to update.
827
+ Session session = 1 [(google.api.field_behavior) = REQUIRED];
828
+
829
+ // Indicates which fields in the provided
830
+ // [Session][google.cloud.discoveryengine.v1beta.Session] to update. The
831
+ // following are NOT supported:
832
+ //
833
+ // * [Session.name][google.cloud.discoveryengine.v1beta.Session.name]
834
+ //
835
+ // If not set or empty, all supported fields are updated.
836
+ google.protobuf.FieldMask update_mask = 2;
837
+ }
838
+
839
+ // Request for DeleteSession method.
840
+ message DeleteSessionRequest {
841
+ // Required. The resource name of the Session to delete. Format:
842
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
843
+ string name = 1 [
844
+ (google.api.field_behavior) = REQUIRED,
845
+ (google.api.resource_reference) = {
846
+ type: "discoveryengine.googleapis.com/Session"
847
+ }
848
+ ];
849
+ }
850
+
851
+ // Request for GetSession method.
852
+ message GetSessionRequest {
853
+ // Required. The resource name of the Session to get. Format:
854
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
855
+ string name = 1 [
856
+ (google.api.field_behavior) = REQUIRED,
857
+ (google.api.resource_reference) = {
858
+ type: "discoveryengine.googleapis.com/Session"
859
+ }
860
+ ];
861
+ }
862
+
863
+ // Request for ListSessions method.
864
+ message ListSessionsRequest {
865
+ // Required. The data store resource name. Format:
866
+ // `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
867
+ string parent = 1 [
868
+ (google.api.field_behavior) = REQUIRED,
869
+ (google.api.resource_reference) = {
870
+ type: "discoveryengine.googleapis.com/DataStore"
871
+ }
872
+ ];
873
+
874
+ // Maximum number of results to return. If unspecified, defaults
875
+ // to 50. Max allowed value is 1000.
876
+ int32 page_size = 2;
877
+
878
+ // A page token, received from a previous `ListSessions` call.
879
+ // Provide this to retrieve the subsequent page.
880
+ string page_token = 3;
881
+
882
+ // A filter to apply on the list results. The supported features are:
883
+ // user_pseudo_id, state.
884
+ //
885
+ // Example:
886
+ // "user_pseudo_id = some_id"
887
+ string filter = 4;
888
+
889
+ // A comma-separated list of fields to order by, sorted in ascending order.
890
+ // Use "desc" after a field name for descending.
891
+ // Supported fields:
892
+ // * `update_time`
893
+ // * `create_time`
894
+ // * `session_name`
895
+ //
896
+ // Example:
897
+ // "update_time desc"
898
+ // "create_time"
899
+ string order_by = 5;
900
+ }
901
+
902
+ // Response for ListSessions method.
903
+ message ListSessionsResponse {
904
+ // All the Sessions for a given data store.
905
+ repeated Session sessions = 1;
906
+
907
+ // Pagination token, if not returned indicates the last page.
908
+ string next_page_token = 2;
909
+ }
@@ -48,12 +48,9 @@ message DocumentProcessingConfig {
48
48
 
49
49
  // The OCR parsing configurations for documents.
50
50
  message OcrParsingConfig {
51
- // Apply additional enhanced OCR processing to a list of document
52
- // elements.
53
- //
54
- // Supported values:
55
- // * `table`: advanced table parsing model.
56
- repeated string enhanced_document_elements = 1;
51
+ // [DEPRECATED] This field is deprecated. To use the additional enhanced
52
+ // document elements processing, please switch to `layout_parsing_config`.
53
+ repeated string enhanced_document_elements = 1 [deprecated = true];
57
54
 
58
55
  // If true, will use native text instead of OCR text on pages containing
59
56
  // native text.
@@ -25,6 +25,7 @@ import "google/cloud/discoveryengine/v1beta/import_config.proto";
25
25
  import "google/cloud/discoveryengine/v1beta/purge_config.proto";
26
26
  import "google/longrunning/operations.proto";
27
27
  import "google/protobuf/empty.proto";
28
+ import "google/protobuf/field_mask.proto";
28
29
 
29
30
  option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Beta";
30
31
  option go_package = "cloud.google.com/go/discoveryengine/apiv1beta/discoveryenginepb;discoveryenginepb";
@@ -88,6 +89,7 @@ service DocumentService {
88
89
  body: "document"
89
90
  }
90
91
  };
92
+ option (google.api.method_signature) = "document,update_mask";
91
93
  }
92
94
 
93
95
  // Deletes a [Document][google.cloud.discoveryengine.v1beta.Document].
@@ -292,6 +294,10 @@ message UpdateDocumentRequest {
292
294
  // new [Document][google.cloud.discoveryengine.v1beta.Document] will be
293
295
  // created.
294
296
  bool allow_missing = 2;
297
+
298
+ // Indicates which fields in the provided imported 'document' to update. If
299
+ // not set, will by default update all fields.
300
+ google.protobuf.FieldMask update_mask = 3;
295
301
  }
296
302
 
297
303
  // Request message for
@@ -43,7 +43,7 @@ message Engine {
43
43
  // The search feature tier of this engine.
44
44
  //
45
45
  // Different tiers might have different
46
- // pricing. To learn more, please check the pricing documentation.
46
+ // pricing. To learn more, check the pricing documentation.
47
47
  //
48
48
  // Defaults to
49
49
  // [SearchTier.SEARCH_TIER_STANDARD][google.cloud.discoveryengine.v1beta.SearchTier.SEARCH_TIER_STANDARD]
@@ -110,7 +110,7 @@ message Engine {
110
110
  // [EngineService.GetEngine][google.cloud.discoveryengine.v1beta.EngineService.GetEngine]
111
111
  // or
112
112
  // [EngineService.ListEngines][google.cloud.discoveryengine.v1beta.EngineService.ListEngines]
113
- // API after engine creation. Please use
113
+ // API after engine creation. Use
114
114
  // [ChatEngineMetadata.dialogflow_agent][google.cloud.discoveryengine.v1beta.Engine.ChatEngineMetadata.dialogflow_agent]
115
115
  // for actual agent association after Engine is created.
116
116
  string dialogflow_agent_to_link = 2;