@google-cloud/discoveryengine 1.6.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 (142) hide show
  1. package/CHANGELOG.md +7 -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 +41 -1
  16. package/build/protos/google/cloud/discoveryengine/v1alpha/common.proto +21 -1
  17. package/build/protos/google/cloud/discoveryengine/v1alpha/conversational_search_service.proto +574 -0
  18. package/build/protos/google/cloud/discoveryengine/v1alpha/document.proto +19 -0
  19. package/build/protos/google/cloud/discoveryengine/v1alpha/document_processing_config.proto +3 -6
  20. package/build/protos/google/cloud/discoveryengine/v1alpha/document_service.proto +64 -0
  21. package/build/protos/google/cloud/discoveryengine/v1alpha/engine.proto +2 -2
  22. package/build/protos/google/cloud/discoveryengine/v1alpha/grounded_generation_service.proto +120 -0
  23. package/build/protos/google/cloud/discoveryengine/v1alpha/grounding.proto +55 -0
  24. package/build/protos/google/cloud/discoveryengine/v1alpha/import_config.proto +283 -24
  25. package/build/protos/google/cloud/discoveryengine/v1alpha/project.proto +102 -0
  26. package/build/protos/google/cloud/discoveryengine/v1alpha/project_service.proto +171 -0
  27. package/build/protos/google/cloud/discoveryengine/v1alpha/schema.proto +21 -0
  28. package/build/protos/google/cloud/discoveryengine/v1alpha/search_service.proto +158 -24
  29. package/build/protos/google/cloud/discoveryengine/v1alpha/search_tuning_service.proto +9 -3
  30. package/build/protos/google/cloud/discoveryengine/v1alpha/serving_config_service.proto +2 -1
  31. package/build/protos/google/cloud/discoveryengine/v1alpha/session.proto +94 -0
  32. package/build/protos/google/cloud/discoveryengine/v1alpha/user_event.proto +1 -1
  33. package/build/protos/google/cloud/discoveryengine/v1beta/answer.proto +328 -0
  34. package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +30 -1
  35. package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +559 -0
  36. package/build/protos/google/cloud/discoveryengine/v1beta/document_processing_config.proto +3 -6
  37. package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +6 -0
  38. package/build/protos/google/cloud/discoveryengine/v1beta/engine.proto +2 -2
  39. package/build/protos/google/cloud/discoveryengine/v1beta/engine_service.proto +93 -0
  40. package/build/protos/google/cloud/discoveryengine/v1beta/grounded_generation_service.proto +120 -0
  41. package/build/protos/google/cloud/discoveryengine/v1beta/grounding.proto +55 -0
  42. package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +283 -24
  43. package/build/protos/google/cloud/discoveryengine/v1beta/rank_service.proto +115 -0
  44. package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +142 -22
  45. package/build/protos/google/cloud/discoveryengine/v1beta/search_tuning_service.proto +7 -1
  46. package/build/protos/google/cloud/discoveryengine/v1beta/session.proto +94 -0
  47. package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +1 -1
  48. package/build/protos/protos.d.ts +44799 -26093
  49. package/build/protos/protos.js +120465 -74222
  50. package/build/protos/protos.json +8911 -4556
  51. package/build/src/index.d.ts +4 -1
  52. package/build/src/index.js +4 -1
  53. package/build/src/v1/conversational_search_service_client.d.ts +4 -0
  54. package/build/src/v1/document_service_client.d.ts +47 -19
  55. package/build/src/v1/index.d.ts +1 -0
  56. package/build/src/v1/index.js +3 -1
  57. package/build/src/v1/recommendation_service_client.d.ts +1087 -0
  58. package/build/src/v1/recommendation_service_client.js +1432 -0
  59. package/build/src/v1/recommendation_service_client_config.json +43 -0
  60. package/build/src/v1/search_service_client.d.ts +27 -9
  61. package/build/src/v1/search_service_client.js +18 -6
  62. package/build/src/v1/search_service_client_config.json +5 -5
  63. package/build/src/v1alpha/acl_config_service_client.d.ts +330 -0
  64. package/build/src/v1alpha/acl_config_service_client.js +454 -0
  65. package/build/src/v1alpha/chunk_service_client.d.ts +330 -0
  66. package/build/src/v1alpha/chunk_service_client.js +454 -0
  67. package/build/src/v1alpha/completion_service_client.d.ts +330 -0
  68. package/build/src/v1alpha/completion_service_client.js +457 -0
  69. package/build/src/v1alpha/conversational_search_service_client.d.ts +674 -0
  70. package/build/src/v1alpha/conversational_search_service_client.js +724 -0
  71. package/build/src/v1alpha/conversational_search_service_client_config.json +35 -0
  72. package/build/src/v1alpha/data_store_service_client.d.ts +330 -0
  73. package/build/src/v1alpha/data_store_service_client.js +457 -0
  74. package/build/src/v1alpha/document_service_client.d.ts +410 -21
  75. package/build/src/v1alpha/document_service_client.js +479 -0
  76. package/build/src/v1alpha/document_service_client_config.json +5 -0
  77. package/build/src/v1alpha/engine_service_client.d.ts +330 -0
  78. package/build/src/v1alpha/engine_service_client.js +457 -0
  79. package/build/src/v1alpha/estimate_billing_service_client.d.ts +330 -0
  80. package/build/src/v1alpha/estimate_billing_service_client.js +457 -0
  81. package/build/src/v1alpha/grounded_generation_service_client.d.ts +1574 -0
  82. package/build/src/v1alpha/grounded_generation_service_client.js +2248 -0
  83. package/build/src/v1alpha/grounded_generation_service_client_config.json +43 -0
  84. package/build/src/v1alpha/index.d.ts +3 -1
  85. package/build/src/v1alpha/index.js +7 -3
  86. package/build/src/v1alpha/project_service_client.d.ts +1756 -0
  87. package/build/src/v1alpha/project_service_client.js +2500 -0
  88. package/build/src/v1alpha/project_service_client_config.json +38 -0
  89. package/build/src/v1alpha/rank_service_client.d.ts +330 -0
  90. package/build/src/v1alpha/rank_service_client.js +454 -0
  91. package/build/src/v1alpha/rank_service_client_config.json +15 -2
  92. package/build/src/v1alpha/recommendation_service_client.d.ts +330 -0
  93. package/build/src/v1alpha/recommendation_service_client.js +454 -0
  94. package/build/src/v1alpha/schema_service_client.d.ts +330 -0
  95. package/build/src/v1alpha/schema_service_client.js +457 -0
  96. package/build/src/v1alpha/search_service_client.d.ts +360 -15
  97. package/build/src/v1alpha/search_service_client.js +474 -10
  98. package/build/src/v1alpha/search_service_client_config.json +5 -5
  99. package/build/src/v1alpha/search_tuning_service_client.d.ts +330 -0
  100. package/build/src/v1alpha/search_tuning_service_client.js +457 -0
  101. package/build/src/v1alpha/serving_config_service_client.d.ts +317 -1
  102. package/build/src/v1alpha/serving_config_service_client.js +434 -1
  103. package/build/src/v1alpha/site_search_engine_service_client.d.ts +330 -0
  104. package/build/src/v1alpha/site_search_engine_service_client.js +457 -0
  105. package/build/src/v1alpha/user_event_service_client.d.ts +330 -0
  106. package/build/src/v1alpha/user_event_service_client.js +457 -0
  107. package/build/src/v1beta/completion_service_client.d.ts +315 -0
  108. package/build/src/v1beta/completion_service_client.js +432 -0
  109. package/build/src/v1beta/conversational_search_service_client.d.ts +659 -0
  110. package/build/src/v1beta/conversational_search_service_client.js +702 -0
  111. package/build/src/v1beta/conversational_search_service_client_config.json +35 -0
  112. package/build/src/v1beta/data_store_service_client.d.ts +315 -0
  113. package/build/src/v1beta/data_store_service_client.js +432 -0
  114. package/build/src/v1beta/document_service_client.d.ts +361 -21
  115. package/build/src/v1beta/document_service_client.js +432 -0
  116. package/build/src/v1beta/engine_service_client.d.ts +410 -0
  117. package/build/src/v1beta/engine_service_client.js +518 -0
  118. package/build/src/v1beta/engine_service_client_config.json +12 -0
  119. package/build/src/v1beta/grounded_generation_service_client.d.ts +1406 -0
  120. package/build/src/v1beta/grounded_generation_service_client.js +2014 -0
  121. package/build/src/v1beta/grounded_generation_service_client_config.json +43 -0
  122. package/build/src/v1beta/index.d.ts +2 -0
  123. package/build/src/v1beta/index.js +5 -1
  124. package/build/src/v1beta/rank_service_client.d.ts +1416 -0
  125. package/build/src/v1beta/rank_service_client.js +2015 -0
  126. package/build/src/v1beta/rank_service_client_config.json +43 -0
  127. package/build/src/v1beta/recommendation_service_client.d.ts +315 -0
  128. package/build/src/v1beta/recommendation_service_client.js +432 -0
  129. package/build/src/v1beta/schema_service_client.d.ts +315 -0
  130. package/build/src/v1beta/schema_service_client.js +432 -0
  131. package/build/src/v1beta/search_service_client.d.ts +342 -12
  132. package/build/src/v1beta/search_service_client.js +450 -8
  133. package/build/src/v1beta/search_service_client_config.json +5 -5
  134. package/build/src/v1beta/search_tuning_service_client.d.ts +315 -0
  135. package/build/src/v1beta/search_tuning_service_client.js +432 -0
  136. package/build/src/v1beta/serving_config_service_client.d.ts +315 -0
  137. package/build/src/v1beta/serving_config_service_client.js +432 -0
  138. package/build/src/v1beta/site_search_engine_service_client.d.ts +315 -0
  139. package/build/src/v1beta/site_search_engine_service_client.js +432 -0
  140. package/build/src/v1beta/user_event_service_client.d.ts +315 -0
  141. package/build/src/v1beta/user_event_service_client.js +432 -0
  142. package/package.json +1 -1
@@ -0,0 +1,102 @@
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/field_behavior.proto";
20
+ import "google/api/resource.proto";
21
+ import "google/protobuf/timestamp.proto";
22
+
23
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
24
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
25
+ option java_multiple_files = true;
26
+ option java_outer_classname = "ProjectProto";
27
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
28
+ option objc_class_prefix = "DISCOVERYENGINE";
29
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
30
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
31
+
32
+ // Metadata and configurations for a Google Cloud project in the service.
33
+ message Project {
34
+ option (google.api.resource) = {
35
+ type: "discoveryengine.googleapis.com/Project"
36
+ pattern: "projects/{project}"
37
+ };
38
+
39
+ // Metadata about the terms of service.
40
+ message ServiceTerms {
41
+ // The agreement states this terms of service.
42
+ enum State {
43
+ // The default value of the enum. This value is not actually used.
44
+ STATE_UNSPECIFIED = 0;
45
+
46
+ // The project has given consent to the terms of service.
47
+ TERMS_ACCEPTED = 1;
48
+
49
+ // The project is pending to review and accept the terms of service.
50
+ TERMS_PENDING = 2;
51
+
52
+ // The project has declined or revoked the agreement to terms of service.
53
+ TERMS_DECLINED = 3;
54
+ }
55
+
56
+ // The unique identifier of this terms of service.
57
+ // Available terms:
58
+ // * `GA_DATA_USE_TERMS`: [Terms for data
59
+ // use](https://cloud.google.com/retail/data-use-terms). When using this as
60
+ // `id`, the acceptable
61
+ // [version][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms.version]
62
+ // to provide is `2022-11-23`.
63
+ string id = 1;
64
+
65
+ // The version string of the terms of service.
66
+ // For acceptable values, see the comments for
67
+ // [id][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms.id] above.
68
+ string version = 2;
69
+
70
+ // Whether the project has accepted/rejected the service terms or it is
71
+ // still pending.
72
+ State state = 4;
73
+
74
+ // The last time when the project agreed to the terms of service.
75
+ google.protobuf.Timestamp accept_time = 5;
76
+
77
+ // The last time when the project declined or revoked the agreement to terms
78
+ // of service.
79
+ google.protobuf.Timestamp decline_time = 6;
80
+ }
81
+
82
+ // Output only. Full resource name of the project, for example
83
+ // `projects/{project_number}`.
84
+ // Note that when making requests, project number and project id are both
85
+ // acceptable, but the server will always respond in project number.
86
+ string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY];
87
+
88
+ // Output only. The timestamp when this project is created.
89
+ google.protobuf.Timestamp create_time = 2
90
+ [(google.api.field_behavior) = OUTPUT_ONLY];
91
+
92
+ // Output only. The timestamp when this project is successfully provisioned.
93
+ // Empty value means this project is still provisioning and is not ready for
94
+ // use.
95
+ google.protobuf.Timestamp provision_completion_time = 3
96
+ [(google.api.field_behavior) = OUTPUT_ONLY];
97
+
98
+ // Output only. A map of terms of services. The key is the `id` of
99
+ // [ServiceTerms][google.cloud.discoveryengine.v1alpha.Project.ServiceTerms].
100
+ map<string, ServiceTerms> service_terms_map = 4
101
+ [(google.api.field_behavior) = OUTPUT_ONLY];
102
+ }
@@ -0,0 +1,171 @@
1
+ // Copyright 2022 Google LLC
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ syntax = "proto3";
16
+
17
+ package google.cloud.discoveryengine.v1alpha;
18
+
19
+ import "google/api/annotations.proto";
20
+ import "google/api/client.proto";
21
+ import "google/api/field_behavior.proto";
22
+ import "google/api/resource.proto";
23
+ import "google/cloud/discoveryengine/v1alpha/project.proto";
24
+ import "google/longrunning/operations.proto";
25
+
26
+ option csharp_namespace = "Google.Cloud.DiscoveryEngine.V1Alpha";
27
+ option go_package = "cloud.google.com/go/discoveryengine/apiv1alpha/discoveryenginepb;discoveryenginepb";
28
+ option java_multiple_files = true;
29
+ option java_outer_classname = "ProjectServiceProto";
30
+ option java_package = "com.google.cloud.discoveryengine.v1alpha";
31
+ option objc_class_prefix = "DISCOVERYENGINE";
32
+ option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
33
+ option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
34
+
35
+ // Service for operations on the
36
+ // [Project][google.cloud.discoveryengine.v1alpha.Project].
37
+ service ProjectService {
38
+ option (google.api.default_host) = "discoveryengine.googleapis.com";
39
+ option (google.api.oauth_scopes) =
40
+ "https://www.googleapis.com/auth/cloud-platform";
41
+
42
+ // Gets a [Project][google.cloud.discoveryengine.v1alpha.Project].
43
+ // Returns NOT_FOUND when the project is not yet created.
44
+ rpc GetProject(GetProjectRequest) returns (Project) {
45
+ option (google.api.http) = {
46
+ get: "/v1alpha/{name=projects/*}"
47
+ };
48
+ option (google.api.method_signature) = "name";
49
+ }
50
+
51
+ // Provisions the project resource. During the
52
+ // process, related systems will get prepared and initialized.
53
+ //
54
+ // Caller must read the [Terms for data
55
+ // use](https://cloud.google.com/retail/data-use-terms), and optionally
56
+ // specify in request to provide consent to that service terms.
57
+ rpc ProvisionProject(ProvisionProjectRequest)
58
+ returns (google.longrunning.Operation) {
59
+ option (google.api.http) = {
60
+ post: "/v1alpha/{name=projects/*}:provision"
61
+ body: "*"
62
+ };
63
+ option (google.api.method_signature) = "name";
64
+ option (google.longrunning.operation_info) = {
65
+ response_type: "google.cloud.discoveryengine.v1alpha.Project"
66
+ metadata_type: "google.cloud.discoveryengine.v1alpha.ProvisionProjectMetadata"
67
+ };
68
+ }
69
+
70
+ // Updates service terms for this project.
71
+ //
72
+ // This method can be used to retroactively accept the latest terms.
73
+ //
74
+ // Terms available for update:
75
+ // * [Terms for data use](https://cloud.google.com/retail/data-use-terms)
76
+ rpc ReportConsentChange(ReportConsentChangeRequest) returns (Project) {
77
+ option (google.api.http) = {
78
+ post: "/v1alpha/{project=projects/*}:reportConsentChange"
79
+ body: "*"
80
+ };
81
+ option (google.api.method_signature) =
82
+ "consent_change_action,project,service_term_id,service_term_version";
83
+ }
84
+ }
85
+
86
+ // Request message for
87
+ // [ProjectService.GetProject][google.cloud.discoveryengine.v1alpha.ProjectService.GetProject]
88
+ // method.
89
+ message GetProjectRequest {
90
+ // Required. Full resource name of a
91
+ // [Project][google.cloud.discoveryengine.v1alpha.Project], such as
92
+ // `projects/{project_id_or_number}`.
93
+ string name = 1 [
94
+ (google.api.field_behavior) = REQUIRED,
95
+ (google.api.resource_reference) = {
96
+ type: "discoveryengine.googleapis.com/Project"
97
+ }
98
+ ];
99
+ }
100
+
101
+ // Request for
102
+ // [ProjectService.ProvisionProject][google.cloud.discoveryengine.v1alpha.ProjectService.ProvisionProject]
103
+ // method.
104
+ message ProvisionProjectRequest {
105
+ // Required. Full resource name of a
106
+ // [Project][google.cloud.discoveryengine.v1alpha.Project], such as
107
+ // `projects/{project_id_or_number}`.
108
+ string name = 1 [
109
+ (google.api.field_behavior) = REQUIRED,
110
+ (google.api.resource_reference) = {
111
+ type: "discoveryengine.googleapis.com/Project"
112
+ }
113
+ ];
114
+
115
+ // Required. Set to `true` to specify that caller has read and would like to
116
+ // give consent to the [Terms for data
117
+ // use](https://cloud.google.com/retail/data-use-terms).
118
+ bool accept_data_use_terms = 2 [(google.api.field_behavior) = REQUIRED];
119
+
120
+ // Required. The version of the [Terms for data
121
+ // use](https://cloud.google.com/retail/data-use-terms) that caller has read
122
+ // and would like to give consent to.
123
+ //
124
+ // Acceptable version is `2022-11-23`, and this may change over time.
125
+ string data_use_terms_version = 3 [(google.api.field_behavior) = REQUIRED];
126
+ }
127
+
128
+ // Metadata associated with a project provision operation.
129
+ message ProvisionProjectMetadata {}
130
+
131
+ // Request for ReportConsentChange method.
132
+ message ReportConsentChangeRequest {
133
+ // Type of consent acknowledgement (accept / reject).
134
+ //
135
+ // At this moment, only `ACCEPT` action is supported.
136
+ enum ConsentChangeAction {
137
+ // Invalid action, user must specify accept/decline
138
+ CONSENT_CHANGE_ACTION_UNSPECIFIED = 0;
139
+
140
+ // User accepts service terms.
141
+ ACCEPT = 1;
142
+ }
143
+
144
+ // Required. Whether customer decides to accept or decline service term.
145
+ //
146
+ // At this moment, only accept action is supported.
147
+ ConsentChangeAction consent_change_action = 1
148
+ [(google.api.field_behavior) = REQUIRED];
149
+
150
+ // Required. Full resource name of a
151
+ // [Project][google.cloud.discoveryengine.v1alpha.Project], such as
152
+ // `projects/{project_id_or_number}`.
153
+ string project = 2 [
154
+ (google.api.field_behavior) = REQUIRED,
155
+ (google.api.resource_reference) = {
156
+ type: "discoveryengine.googleapis.com/Project"
157
+ }
158
+ ];
159
+
160
+ // Required. The unique identifier of the terms of service to update.
161
+ // Available term ids:
162
+ // * `GA_DATA_USE_TERMS`: [Terms for data
163
+ // use](https://cloud.google.com/retail/data-use-terms). When using this
164
+ // service term id, the acceptable
165
+ // [service_term_version][google.cloud.discoveryengine.v1alpha.ReportConsentChangeRequest.service_term_version]
166
+ // to provide is `2022-11-23`.
167
+ string service_term_id = 3 [(google.api.field_behavior) = REQUIRED];
168
+
169
+ // Required. The version string of the terms of service to update.
170
+ string service_term_version = 4 [(google.api.field_behavior) = REQUIRED];
171
+ }
@@ -163,6 +163,18 @@ message FieldConfig {
163
163
  FILTERABLE_DISABLED = 2;
164
164
  }
165
165
 
166
+ // Optional source of the advanced site search field.
167
+ enum AdvancedSiteSearchDataSource {
168
+ // Value used when unset.
169
+ ADVANCED_SITE_SEARCH_DATA_SOURCE_UNSPECIFIED = 0;
170
+
171
+ // Retrieve value from meta tag.
172
+ METATAGS = 1;
173
+
174
+ // Retrieve value from page map.
175
+ PAGEMAP = 2;
176
+ }
177
+
166
178
  // Required. Field path of the schema field.
167
179
  // For example: `title`, `description`, `release_info.release_year`.
168
180
  string field_path = 1 [(google.api.field_behavior) = REQUIRED];
@@ -312,4 +324,13 @@ message FieldConfig {
312
324
  // `indexable_option` and `searchable_option` of this field cannot be
313
325
  // modified.
314
326
  string key_property_type = 7 [(google.api.field_behavior) = OUTPUT_ONLY];
327
+
328
+ // If this field is set, only the corresponding source will be indexed for
329
+ // this field. Otherwise, the values from different sources are merged.
330
+ //
331
+ // Assuming a page with `<author, a>` in meta tag, and `<author, b>` in page
332
+ // map:
333
+ // if this enum is set to METATAGS, we will only index `<author, a>`;
334
+ // if this enum is not set, we will merge them and index `<author, [a, b]>`.
335
+ repeated AdvancedSiteSearchDataSource advanced_site_search_data_sources = 10;
315
336
  }
@@ -218,6 +218,80 @@ message SearchRequest {
218
218
  message BoostSpec {
219
219
  // Boost applies to documents which match a condition.
220
220
  message ConditionBoostSpec {
221
+ // Specification for custom ranking based on customer specified attribute
222
+ // value. It provides more controls for customized ranking than the simple
223
+ // (condition, boost) combination above.
224
+ message BoostControlSpec {
225
+ // The control points used to define the curve. The curve defined
226
+ // through these control points can only be monotonically increasing
227
+ // or decreasing(constant values are acceptable).
228
+ message ControlPoint {
229
+ // Can be one of:
230
+ // 1. The numerical field value.
231
+ // 2. The duration spec for freshness:
232
+ // The value must be formatted as an XSD `dayTimeDuration` value (a
233
+ // restricted subset of an ISO 8601 duration value). The pattern for
234
+ // this is: `[nD][T[nH][nM][nS]]`.
235
+ string attribute_value = 1;
236
+
237
+ // The value between -1 to 1 by which to boost the score if the
238
+ // attribute_value evaluates to the value specified above.
239
+ float boost_amount = 2;
240
+ }
241
+
242
+ // The attribute(or function) for which the custom ranking is to be
243
+ // applied.
244
+ enum AttributeType {
245
+ // Unspecified AttributeType.
246
+ ATTRIBUTE_TYPE_UNSPECIFIED = 0;
247
+
248
+ // The value of the numerical field will be used to dynamically update
249
+ // the boost amount. In this case, the attribute_value (the x value)
250
+ // of the control point will be the actual value of the numerical
251
+ // field for which the boost_amount is specified.
252
+ NUMERICAL = 1;
253
+
254
+ // For the freshness use case the attribute value will be the duration
255
+ // between the current time and the date in the datetime field
256
+ // specified. The value must be formatted as an XSD `dayTimeDuration`
257
+ // value (a restricted subset of an ISO 8601 duration value). The
258
+ // pattern for this is: `[nD][T[nH][nM][nS]]`.
259
+ // E.g. `5D`, `3DT12H30M`, `T24H`.
260
+ FRESHNESS = 2;
261
+ }
262
+
263
+ // The interpolation type to be applied. Default will be linear
264
+ // (Piecewise Linear).
265
+ enum InterpolationType {
266
+ // Interpolation type is unspecified. In this case, it defaults to
267
+ // Linear.
268
+ INTERPOLATION_TYPE_UNSPECIFIED = 0;
269
+
270
+ // Piecewise linear interpolation will be applied.
271
+ LINEAR = 1;
272
+ }
273
+
274
+ // The name of the field whose value will be used to determine the
275
+ // boost amount.
276
+ string field_name = 1;
277
+
278
+ // The attribute type to be used to determine the boost amount. The
279
+ // attribute value can be derived from the field value of the specified
280
+ // field_name. In the case of numerical it is straightforward i.e.
281
+ // attribute_value = numerical_field_value. In the case of freshness
282
+ // however, attribute_value = (time.now() - datetime_field_value).
283
+ AttributeType attribute_type = 2;
284
+
285
+ // The interpolation type to be applied to connect the control points
286
+ // listed below.
287
+ InterpolationType interpolation_type = 3;
288
+
289
+ // The control points used to define the curve. The monotonic function
290
+ // (defined through the interpolation_type above) passes through the
291
+ // control points listed here.
292
+ repeated ControlPoint control_points = 4;
293
+ }
294
+
221
295
  // An expression which specifies a boost condition. The syntax and
222
296
  // supported fields are the same as a filter expression. See
223
297
  // [SearchRequest.filter][google.cloud.discoveryengine.v1alpha.SearchRequest.filter]
@@ -233,21 +307,27 @@ message SearchRequest {
233
307
  // Strength of the condition boost, which should be in [-1, 1]. Negative
234
308
  // boost means demotion. Default is 0.0.
235
309
  //
236
- // Setting to 1.0 gives the document a big promotion. However, it does not
237
- // necessarily mean that the boosted document will be the top result at
238
- // all times, nor that other documents will be excluded. Results could
239
- // still be shown even when none of them matches the condition. And
240
- // results that are significantly more relevant to the search query can
241
- // still trump your heavily favored but irrelevant documents.
310
+ // Setting to 1.0 gives the document a big promotion. However, it does
311
+ // not necessarily mean that the boosted document will be the top result
312
+ // at all times, nor that other documents will be excluded. Results
313
+ // could still be shown even when none of them matches the condition.
314
+ // And results that are significantly more relevant to the search query
315
+ // can still trump your heavily favored but irrelevant documents.
242
316
  //
243
317
  // Setting to -1.0 gives the document a big demotion. However, results
244
318
  // that are deeply relevant might still be shown. The document will have
245
- // an upstream battle to get a fairly high ranking, but it is not blocked
246
- // out completely.
319
+ // an upstream battle to get a fairly high ranking, but it is not
320
+ // blocked out completely.
247
321
  //
248
322
  // Setting to 0.0 means no boost applied. The boosting condition is
249
- // ignored.
323
+ // ignored. Only one of the (condition, boost) combination or the
324
+ // boost_control_spec below are set. If both are set then the global boost
325
+ // is ignored and the more fine-grained boost_control_spec is applied.
250
326
  float boost = 2;
327
+
328
+ // Complex specification for custom ranking based on customer defined
329
+ // attribute value.
330
+ BoostControlSpec boost_control_spec = 3;
251
331
  }
252
332
 
253
333
  // Condition boost specifications. If a document matches multiple conditions
@@ -348,11 +428,13 @@ message SearchRequest {
348
428
  // Supported values are:
349
429
  //
350
430
  // * `stable`: string. Default value when no value is specified. Uses a
351
- // generally available, fine-tuned version of the text-bison@001
352
- // model.
353
- // * `preview`: string. (Public preview) Uses a fine-tuned version of
354
- // the text-bison@002 model. This model works only for summaries in
355
- // English.
431
+ // generally available, fine-tuned model. For more information, see
432
+ // [Answer generation model versions and
433
+ // lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
434
+ // * `preview`: string. (Public preview) Uses a preview model. For more
435
+ // information, see
436
+ // [Answer generation model versions and
437
+ // lifecycle](https://cloud.google.com/generative-ai-app-builder/docs/answer-generation-models).
356
438
  string version = 1;
357
439
  }
358
440
 
@@ -360,7 +442,11 @@ message SearchRequest {
360
442
  // of results returned is less than `summaryResultCount`, the summary is
361
443
  // generated from all of the results.
362
444
  //
363
- // At most 10 results can be used to generate a summary.
445
+ // At most 10 results for documents mode, or 50 for chunks mode, can be
446
+ // used to generate a summary. The chunks mode is used when
447
+ // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
448
+ // is set to
449
+ // [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS].
364
450
  int32 summary_result_count = 1;
365
451
 
366
452
  // Specifies whether to include citations in the summary. The default
@@ -419,6 +505,14 @@ message SearchRequest {
419
505
  // If specified, the spec will be used to modify the model specification
420
506
  // provided to the LLM.
421
507
  ModelSpec model_spec = 7;
508
+
509
+ // If true, answer will be generated from most relevant chunks from top
510
+ // search results. This feature will improve summary quality.
511
+ // Note that with this feature enabled, not all top search results
512
+ // will be referenced and included in the reference list, so the citation
513
+ // source index only points to the search results listed in the reference
514
+ // list.
515
+ bool use_semantic_chunks = 8;
422
516
  }
423
517
 
424
518
  // A specification for configuring the extractive content in a search
@@ -459,10 +553,9 @@ message SearchRequest {
459
553
  int32 max_extractive_segment_count = 2;
460
554
 
461
555
  // Specifies whether to return the confidence score from the extractive
462
- // segments in each search result. The default value is `false`.
463
- //
464
- // Note: this is a priavte preview feature and only works for allowlisted
465
- // users, please reach out to Cloud Support team if you want to use it.
556
+ // segments in each search result. This feature is available only for new
557
+ // or allowlisted data stores. To allowlist your data store,
558
+ // contact your Customer Engineer. The default value is `false`.
466
559
  bool return_extractive_segment_score = 3;
467
560
 
468
561
  // Specifies whether to also include the adjacent from each selected
@@ -476,6 +569,23 @@ message SearchRequest {
476
569
  int32 num_next_segments = 5;
477
570
  }
478
571
 
572
+ // Specifies the chunk spec to be returned from the search response.
573
+ // Only available if the
574
+ // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
575
+ // is set to
576
+ // [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
577
+ message ChunkSpec {
578
+ // The number of previous chunks to be returned of the current chunk. The
579
+ // maximum allowed value is 3.
580
+ // If not specified, no previous chunks will be returned.
581
+ int32 num_previous_chunks = 1;
582
+
583
+ // The number of next chunks to be returned of the current chunk. The
584
+ // maximum allowed value is 3.
585
+ // If not specified, no next chunks will be returned.
586
+ int32 num_next_chunks = 2;
587
+ }
588
+
479
589
  // Specifies the search result mode. If unspecified, the
480
590
  // search result mode is based on
481
591
  // [DataStore.DocumentProcessingConfig.chunking_config][]:
@@ -513,6 +623,13 @@ message SearchRequest {
513
623
  // it defaults to `CHUNKS`.
514
624
  // * Otherwise, it defaults to `DOCUMENTS`.
515
625
  SearchResultMode search_result_mode = 4;
626
+
627
+ // Specifies the chunk spec to be returned from the search response.
628
+ // Only available if the
629
+ // [SearchRequest.ContentSearchSpec.search_result_mode][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.search_result_mode]
630
+ // is set to
631
+ // [CHUNKS][google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec.SearchResultMode.CHUNKS]
632
+ ChunkSpec chunk_spec = 5;
516
633
  }
517
634
 
518
635
  // The specification that uses customized query embedding vector to do
@@ -560,11 +677,15 @@ message SearchRequest {
560
677
  ImageQuery image_query = 19;
561
678
 
562
679
  // Maximum number of
563
- // [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. If
564
- // unspecified, defaults to a reasonable value. The maximum allowed value is
565
- // 100. Values above 100 are coerced to 100.
680
+ // [Document][google.cloud.discoveryengine.v1alpha.Document]s to return. The
681
+ // maximum allowed value depends on the data type. Values above the maximum
682
+ // value are coerced to the maximum value.
566
683
  //
567
- // If this field is negative, an `INVALID_ARGUMENT` is returned.
684
+ // * Websites with basic indexing: Default `10`, Maximum `25`.
685
+ // * Websites with advanced indexing: Default `25`, Maximum `50`.
686
+ // * Other: Default `50`, Maximum `100`.
687
+ //
688
+ // If this field is negative, an `INVALID_ARGUMENT` is returned.
568
689
  int32 page_size = 4;
569
690
 
570
691
  // A page token received from a previous
@@ -701,7 +822,8 @@ message SearchRequest {
701
822
  //
702
823
  // If
703
824
  // [SearchRequest.EmbeddingSpec.EmbeddingVector.field_path][google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path]
704
- // is not provided, it will use [ServingConfig.EmbeddingConfig.field_path][].
825
+ // is not provided, it will use
826
+ // [ServingConfig.EmbeddingConfig.field_path][google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config].
705
827
  EmbeddingSpec embedding_spec = 23;
706
828
 
707
829
  // The ranking expression controls the customized ranking on retrieval
@@ -867,6 +989,15 @@ message SearchResponse {
867
989
 
868
990
  // Document reference.
869
991
  message Reference {
992
+ // Chunk content.
993
+ message ChunkContent {
994
+ // Chunk textual content.
995
+ string content = 1;
996
+
997
+ // Page identifier.
998
+ string page_identifier = 2;
999
+ }
1000
+
870
1001
  // Title of the document.
871
1002
  string title = 1;
872
1003
 
@@ -884,6 +1015,9 @@ message SearchResponse {
884
1015
 
885
1016
  // Cloud Storage or HTTP uri for the document.
886
1017
  string uri = 3;
1018
+
1019
+ // List of cited chunk contents derived from document content.
1020
+ repeated ChunkContent chunk_contents = 4;
887
1021
  }
888
1022
 
889
1023
  // Summary with metadata information.
@@ -65,8 +65,8 @@ message TrainCustomModelRequest {
65
65
  // A newline delimited jsonl/ndjson file.
66
66
  //
67
67
  // For search-tuning model, each line should have the _id, title
68
- // and text. Example: {"_id": "doc1", title: "relevant doc", "text":
69
- // "relevant text"}
68
+ // and text. Example:
69
+ // `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`
70
70
  string corpus_data_path = 1;
71
71
 
72
72
  // The gcs query data which could be associated in train data.
@@ -134,9 +134,15 @@ message TrainCustomModelResponse {
134
134
  //
135
135
  // * **bad-data**: The training data quality is bad.
136
136
  // * **no-improvement**: Tuning didn't improve performance. Won't deploy.
137
- // * **in-progress**: Model training is in progress.
137
+ // * **in-progress**: Model training job creation is in progress.
138
+ // * **training**: Model is actively training.
139
+ // * **evaluating**: The model is evaluating trained metrics.
140
+ // * **indexing**: The model trained metrics are indexing.
138
141
  // * **ready**: The model is ready for serving.
139
142
  string model_status = 3;
143
+
144
+ // The metrics of the trained model.
145
+ map<string, double> metrics = 4;
140
146
  }
141
147
 
142
148
  // Metadata related to the progress of the TrainCustomModel operation. This is
@@ -32,7 +32,8 @@ option objc_class_prefix = "DISCOVERYENGINE";
32
32
  option php_namespace = "Google\\Cloud\\DiscoveryEngine\\V1alpha";
33
33
  option ruby_package = "Google::Cloud::DiscoveryEngine::V1alpha";
34
34
 
35
- // Service for operations related to [ServingConfig][].
35
+ // Service for operations related to
36
+ // [ServingConfig][google.cloud.discoveryengine.v1alpha.ServingConfig].
36
37
  service ServingConfigService {
37
38
  option (google.api.default_host) = "discoveryengine.googleapis.com";
38
39
  option (google.api.oauth_scopes) =