@google-cloud/discoveryengine 2.0.1 → 2.2.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.
- package/CHANGELOG.md +14 -0
- package/README.md +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/answer.proto +54 -2
- package/build/protos/google/cloud/discoveryengine/v1/chunk.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +35 -6
- package/build/protos/google/cloud/discoveryengine/v1/control.proto +113 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +168 -2
- package/build/protos/google/cloud/discoveryengine/v1/data_store.proto +23 -4
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +7 -2
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/engine.proto +16 -3
- package/build/protos/google/cloud/discoveryengine/v1/grounded_generation_service.proto +70 -9
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +20 -1
- package/build/protos/google/cloud/discoveryengine/v1/purge_config.proto +9 -5
- package/build/protos/google/cloud/discoveryengine/v1/rank_service.proto +3 -1
- package/build/protos/google/cloud/discoveryengine/v1/recommendation_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1/safety.proto +107 -0
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +96 -8
- package/build/protos/google/cloud/discoveryengine/v1/serving_config.proto +271 -0
- package/build/protos/google/cloud/discoveryengine/v1/serving_config_service.proto +75 -0
- package/build/protos/google/cloud/discoveryengine/v1/session.proto +19 -0
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine.proto +27 -3
- package/build/protos/google/cloud/discoveryengine/v1/site_search_engine_service.proto +184 -5
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +34 -0
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +16 -4
- package/build/protos/protos.d.ts +4390 -300
- package/build/protos/protos.js +13785 -2922
- package/build/protos/protos.json +1355 -14
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -21
- package/build/src/v1/completion_service_client.d.ts +313 -76
- package/build/src/v1/completion_service_client.js +451 -262
- package/build/src/v1/completion_service_proto_list.json +3 -0
- package/build/src/v1/control_service_client.d.ts +318 -81
- package/build/src/v1/control_service_client.js +422 -132
- package/build/src/v1/control_service_proto_list.json +3 -0
- package/build/src/v1/conversational_search_service_client.d.ts +341 -134
- package/build/src/v1/conversational_search_service_client.js +395 -223
- package/build/src/v1/conversational_search_service_client_config.json +5 -0
- package/build/src/v1/conversational_search_service_proto_list.json +3 -0
- package/build/src/v1/data_store_service_client.d.ts +359 -122
- package/build/src/v1/data_store_service_client.js +460 -280
- package/build/src/v1/data_store_service_proto_list.json +3 -0
- package/build/src/v1/document_service_client.d.ts +364 -121
- package/build/src/v1/document_service_client.js +469 -300
- package/build/src/v1/document_service_proto_list.json +3 -0
- package/build/src/v1/engine_service_client.d.ts +340 -103
- package/build/src/v1/engine_service_client.js +460 -279
- package/build/src/v1/engine_service_proto_list.json +3 -0
- package/build/src/v1/gapic_metadata.json +59 -0
- package/build/src/v1/grounded_generation_service_client.d.ts +286 -51
- package/build/src/v1/grounded_generation_service_client.js +405 -100
- package/build/src/v1/grounded_generation_service_proto_list.json +3 -0
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/project_service_client.d.ts +313 -76
- package/build/src/v1/project_service_client.js +434 -222
- package/build/src/v1/project_service_proto_list.json +3 -0
- package/build/src/v1/rank_service_client.d.ts +285 -48
- package/build/src/v1/rank_service_client.js +398 -85
- package/build/src/v1/rank_service_proto_list.json +3 -0
- package/build/src/v1/recommendation_service_client.d.ts +142 -49
- package/build/src/v1/recommendation_service_client.js +198 -82
- package/build/src/v1/recommendation_service_proto_list.json +3 -0
- package/build/src/v1/schema_service_client.d.ts +348 -111
- package/build/src/v1/schema_service_client.js +457 -273
- package/build/src/v1/schema_service_proto_list.json +3 -0
- package/build/src/v1/search_service_client.d.ts +748 -559
- package/build/src/v1/search_service_client.js +302 -133
- package/build/src/v1/search_service_proto_list.json +3 -0
- package/build/src/v1/search_tuning_service_client.d.ts +314 -77
- package/build/src/v1/search_tuning_service_client.js +439 -235
- package/build/src/v1/search_tuning_service_proto_list.json +3 -0
- package/build/src/v1/serving_config_service_client.d.ts +1851 -0
- package/build/src/v1/serving_config_service_client.js +2642 -0
- package/build/src/v1/serving_config_service_client_config.json +30 -0
- package/build/src/v1/serving_config_service_proto_list.json +39 -0
- package/build/src/v1/site_search_engine_service_client.d.ts +504 -151
- package/build/src/v1/site_search_engine_service_client.js +625 -351
- package/build/src/v1/site_search_engine_service_client_config.json +12 -0
- package/build/src/v1/site_search_engine_service_proto_list.json +3 -0
- package/build/src/v1/user_event_service_client.d.ts +335 -86
- package/build/src/v1/user_event_service_client.js +447 -253
- package/build/src/v1/user_event_service_proto_list.json +3 -0
- package/build/src/v1alpha/acl_config_service_client.d.ts +49 -49
- package/build/src/v1alpha/acl_config_service_client.js +82 -106
- package/build/src/v1alpha/chunk_service_client.d.ts +88 -88
- package/build/src/v1alpha/chunk_service_client.js +92 -120
- package/build/src/v1alpha/completion_service_client.d.ts +77 -77
- package/build/src/v1alpha/completion_service_client.js +134 -280
- package/build/src/v1alpha/control_service_client.d.ts +85 -85
- package/build/src/v1alpha/control_service_client.js +105 -151
- package/build/src/v1alpha/conversational_search_service_client.d.ts +143 -143
- package/build/src/v1alpha/conversational_search_service_client.js +145 -237
- package/build/src/v1alpha/data_store_service_client.d.ts +126 -126
- package/build/src/v1alpha/data_store_service_client.js +151 -316
- package/build/src/v1alpha/document_service_client.d.ts +126 -126
- package/build/src/v1alpha/document_service_client.js +156 -328
- package/build/src/v1alpha/engine_service_client.d.ts +106 -106
- package/build/src/v1alpha/engine_service_client.js +155 -325
- package/build/src/v1alpha/estimate_billing_service_client.d.ts +76 -76
- package/build/src/v1alpha/estimate_billing_service_client.js +118 -243
- package/build/src/v1alpha/evaluation_service_client.d.ts +161 -161
- package/build/src/v1alpha/evaluation_service_client.js +143 -295
- package/build/src/v1alpha/grounded_generation_service_client.d.ts +48 -48
- package/build/src/v1alpha/grounded_generation_service_client.js +79 -100
- package/build/src/v1alpha/project_service_client.d.ts +78 -78
- package/build/src/v1alpha/project_service_client.js +126 -262
- package/build/src/v1alpha/rank_service_client.d.ts +47 -47
- package/build/src/v1alpha/rank_service_client.js +81 -104
- package/build/src/v1alpha/recommendation_service_client.d.ts +47 -47
- package/build/src/v1alpha/recommendation_service_client.js +79 -100
- package/build/src/v1alpha/sample_query_service_client.d.ts +123 -123
- package/build/src/v1alpha/sample_query_service_client.js +144 -301
- package/build/src/v1alpha/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1alpha/sample_query_set_service_client.js +106 -153
- package/build/src/v1alpha/schema_service_client.d.ts +112 -112
- package/build/src/v1alpha/schema_service_client.js +140 -292
- package/build/src/v1alpha/search_service_client.d.ts +327 -327
- package/build/src/v1alpha/search_service_client.js +88 -112
- package/build/src/v1alpha/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1alpha/search_tuning_service_client.js +122 -253
- package/build/src/v1alpha/serving_config_service_client.d.ts +75 -75
- package/build/src/v1alpha/serving_config_service_client.js +97 -133
- package/build/src/v1alpha/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1alpha/site_search_engine_service_client.js +184 -387
- package/build/src/v1alpha/user_event_service_client.d.ts +78 -78
- package/build/src/v1alpha/user_event_service_client.js +130 -271
- package/build/src/v1beta/completion_service_client.d.ts +78 -78
- package/build/src/v1beta/completion_service_client.js +136 -279
- package/build/src/v1beta/control_service_client.d.ts +84 -84
- package/build/src/v1beta/control_service_client.js +103 -147
- package/build/src/v1beta/conversational_search_service_client.d.ts +142 -142
- package/build/src/v1beta/conversational_search_service_client.js +143 -233
- package/build/src/v1beta/data_store_service_client.d.ts +124 -124
- package/build/src/v1beta/data_store_service_client.js +141 -288
- package/build/src/v1beta/document_service_client.d.ts +124 -124
- package/build/src/v1beta/document_service_client.js +150 -309
- package/build/src/v1beta/engine_service_client.d.ts +106 -106
- package/build/src/v1beta/engine_service_client.js +153 -315
- package/build/src/v1beta/evaluation_service_client.d.ts +161 -161
- package/build/src/v1beta/evaluation_service_client.js +141 -285
- package/build/src/v1beta/grounded_generation_service_client.d.ts +49 -49
- package/build/src/v1beta/grounded_generation_service_client.js +86 -114
- package/build/src/v1beta/project_service_client.d.ts +76 -76
- package/build/src/v1beta/project_service_client.js +115 -231
- package/build/src/v1beta/rank_service_client.d.ts +47 -47
- package/build/src/v1beta/rank_service_client.js +79 -99
- package/build/src/v1beta/recommendation_service_client.d.ts +47 -47
- package/build/src/v1beta/recommendation_service_client.js +77 -96
- package/build/src/v1beta/sample_query_service_client.d.ts +123 -123
- package/build/src/v1beta/sample_query_service_client.js +142 -291
- package/build/src/v1beta/sample_query_set_service_client.d.ts +94 -94
- package/build/src/v1beta/sample_query_set_service_client.js +104 -149
- package/build/src/v1beta/schema_service_client.d.ts +111 -111
- package/build/src/v1beta/schema_service_client.js +138 -282
- package/build/src/v1beta/search_service_client.d.ts +665 -665
- package/build/src/v1beta/search_service_client.js +97 -128
- package/build/src/v1beta/search_tuning_service_client.d.ts +77 -77
- package/build/src/v1beta/search_tuning_service_client.js +120 -243
- package/build/src/v1beta/serving_config_service_client.d.ts +75 -75
- package/build/src/v1beta/serving_config_service_client.js +95 -129
- package/build/src/v1beta/site_search_engine_service_client.d.ts +151 -151
- package/build/src/v1beta/site_search_engine_service_client.js +186 -386
- package/build/src/v1beta/user_event_service_client.d.ts +78 -78
- package/build/src/v1beta/user_event_service_client.js +128 -261
- package/package.json +4 -4
@@ -117,286 +117,286 @@ export declare class SearchServiceClient {
|
|
117
117
|
getProjectId(): Promise<string>;
|
118
118
|
getProjectId(callback: Callback<string, undefined, undefined>): void;
|
119
119
|
/**
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
120
|
+
* Performs a search.
|
121
|
+
*
|
122
|
+
* @param {Object} request
|
123
|
+
* The request object that will be sent.
|
124
|
+
* @param {string} request.servingConfig
|
125
|
+
* Required. The resource name of the Search serving config, such as
|
126
|
+
* `projects/* /locations/global/collections/default_collection/engines/* /servingConfigs/default_serving_config`,
|
127
|
+
* or
|
128
|
+
* `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/servingConfigs/default_serving_config`.
|
129
|
+
* This field is used to identify the serving configuration name, set
|
130
|
+
* of models used to make the search.
|
131
|
+
* @param {string} request.branch
|
132
|
+
* The branch resource name, such as
|
133
|
+
* `projects/* /locations/global/collections/default_collection/dataStores/default_data_store/branches/0`.
|
134
|
+
*
|
135
|
+
* Use `default_branch` as the branch ID or leave this field empty, to search
|
136
|
+
* documents under the default branch.
|
137
|
+
* @param {string} request.query
|
138
|
+
* Raw search query.
|
139
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.ImageQuery} request.imageQuery
|
140
|
+
* Raw image query.
|
141
|
+
* @param {number} request.pageSize
|
142
|
+
* Maximum number of
|
143
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s to return. The
|
144
|
+
* maximum allowed value depends on the data type. Values above the maximum
|
145
|
+
* value are coerced to the maximum value.
|
146
|
+
*
|
147
|
+
* * Websites with basic indexing: Default `10`, Maximum `25`.
|
148
|
+
* * Websites with advanced indexing: Default `25`, Maximum `50`.
|
149
|
+
* * Other: Default `50`, Maximum `100`.
|
150
|
+
*
|
151
|
+
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
152
|
+
* @param {string} request.pageToken
|
153
|
+
* A page token received from a previous
|
154
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
|
155
|
+
* call. Provide this to retrieve the subsequent page.
|
156
|
+
*
|
157
|
+
* When paginating, all other parameters provided to
|
158
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchService.Search|SearchService.Search}
|
159
|
+
* must match the call that provided the page token. Otherwise, an
|
160
|
+
* `INVALID_ARGUMENT` error is returned.
|
161
|
+
* @param {number} request.offset
|
162
|
+
* A 0-indexed integer that specifies the current offset (that is, starting
|
163
|
+
* result location, amongst the
|
164
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}s deemed by the
|
165
|
+
* API as relevant) in search results. This field is only considered if
|
166
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.page_token|page_token}
|
167
|
+
* is unset.
|
168
|
+
*
|
169
|
+
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
170
|
+
* @param {number[]} request.dataStoreSpecs
|
171
|
+
* Specs defining dataStores to filter on in a search call and configurations
|
172
|
+
* for those dataStores. This is only considered for engines with multiple
|
173
|
+
* dataStores use case. For single dataStore within an engine, they should
|
174
|
+
* use the specs at the top level.
|
175
|
+
* @param {string} request.filter
|
176
|
+
* The filter syntax consists of an expression language for constructing a
|
177
|
+
* predicate from one or more fields of the documents being filtered. Filter
|
178
|
+
* expression is case-sensitive.
|
179
|
+
*
|
180
|
+
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
181
|
+
*
|
182
|
+
* Filtering in Vertex AI Search is done by mapping the LHS filter key to a
|
183
|
+
* key property defined in the Vertex AI Search backend -- this mapping is
|
184
|
+
* defined by the customer in their schema. For example a media customer might
|
185
|
+
* have a field 'name' in their schema. In this case the filter would look
|
186
|
+
* like this: filter --> name:'ANY("king kong")'
|
187
|
+
*
|
188
|
+
* For more information about filtering including syntax and filter
|
189
|
+
* operators, see
|
190
|
+
* [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
191
|
+
* @param {string} request.canonicalFilter
|
192
|
+
* The default filter that is applied when a user performs a search without
|
193
|
+
* checking any filters on the search page.
|
194
|
+
*
|
195
|
+
* The filter applied to every search request when quality improvement such as
|
196
|
+
* query expansion is needed. In the case a query does not have a sufficient
|
197
|
+
* amount of results this filter will be used to determine whether or not to
|
198
|
+
* enable the query expansion flow. The original filter will still be used for
|
199
|
+
* the query expanded search.
|
200
|
+
* This field is strongly recommended to achieve high search quality.
|
201
|
+
*
|
202
|
+
* For more information about filter syntax, see
|
203
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.filter|SearchRequest.filter}.
|
204
|
+
* @param {string} request.orderBy
|
205
|
+
* The order in which documents are returned. Documents can be ordered by
|
206
|
+
* a field in an {@link protos.google.cloud.discoveryengine.v1alpha.Document|Document}
|
207
|
+
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
208
|
+
* case-sensitive.
|
209
|
+
*
|
210
|
+
* For more information on ordering the website search results, see
|
211
|
+
* [Order web search
|
212
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
|
213
|
+
* For more information on ordering the healthcare search results, see
|
214
|
+
* [Order healthcare search
|
215
|
+
* results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
|
216
|
+
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
217
|
+
* @param {google.cloud.discoveryengine.v1alpha.UserInfo} request.userInfo
|
218
|
+
* Information about the end user.
|
219
|
+
* Highly recommended for analytics.
|
220
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.UserInfo.user_agent|UserInfo.user_agent}
|
221
|
+
* is used to deduce `device_type` for analytics.
|
222
|
+
* @param {string} request.languageCode
|
223
|
+
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
224
|
+
* information, see [Standard
|
225
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). This field
|
226
|
+
* helps to better interpret the query. If a value isn't specified, the query
|
227
|
+
* language code is automatically detected, which may not be accurate.
|
228
|
+
* @param {string} request.regionCode
|
229
|
+
* The Unicode country/region code (CLDR) of a location, such as "US" and
|
230
|
+
* "419". For more information, see [Standard
|
231
|
+
* fields](https://cloud.google.com/apis/design/standard_fields). If set,
|
232
|
+
* then results will be boosted based on the region_code provided.
|
233
|
+
* @param {number[]} request.facetSpecs
|
234
|
+
* Facet specifications for faceted search. If empty, no facets are returned.
|
235
|
+
*
|
236
|
+
* A maximum of 100 values are allowed. Otherwise, an `INVALID_ARGUMENT`
|
237
|
+
* error is returned.
|
238
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.BoostSpec} request.boostSpec
|
239
|
+
* Boost specification to boost certain documents.
|
240
|
+
* For more information on boosting, see
|
241
|
+
* [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
|
242
|
+
* @param {number[]} request.params
|
243
|
+
* Additional search parameters.
|
244
|
+
*
|
245
|
+
* For public website search only, supported values are:
|
246
|
+
*
|
247
|
+
* * `user_country_code`: string. Default empty. If set to non-empty, results
|
248
|
+
* are restricted or boosted based on the location provided.
|
249
|
+
* For example, `user_country_code: "au"`
|
250
|
+
*
|
251
|
+
* For available codes see [Country
|
252
|
+
* Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
253
|
+
*
|
254
|
+
* * `search_type`: double. Default empty. Enables non-webpage searching
|
255
|
+
* depending on the value. The only valid non-default value is 1,
|
256
|
+
* which enables image searching.
|
257
|
+
* For example, `search_type: 1`
|
258
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
|
259
|
+
* The query expansion specification that specifies the conditions under which
|
260
|
+
* query expansion occurs.
|
261
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
|
262
|
+
* The spell correction specification that specifies the mode under
|
263
|
+
* which spell correction takes effect.
|
264
|
+
* @param {string} request.userPseudoId
|
265
|
+
* A unique identifier for tracking visitors. For example, this could be
|
266
|
+
* implemented with an HTTP cookie, which should be able to uniquely identify
|
267
|
+
* a visitor on a single device. This unique identifier should not change if
|
268
|
+
* the visitor logs in or out of the website.
|
269
|
+
*
|
270
|
+
* This field should NOT have a fixed value such as `unknown_visitor`.
|
271
|
+
*
|
272
|
+
* This should be the same identifier as
|
273
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
|
274
|
+
* and
|
275
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
|
276
|
+
*
|
277
|
+
* The field must be a UTF-8 encoded string with a length limit of 128
|
278
|
+
* characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
279
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.ContentSearchSpec} request.contentSearchSpec
|
280
|
+
* A specification for configuring the behavior of content search.
|
281
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec} request.embeddingSpec
|
282
|
+
* Uses the provided embedding to do additional semantic document retrieval.
|
283
|
+
* The retrieval is based on the dot product of
|
284
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.vector|SearchRequest.EmbeddingSpec.EmbeddingVector.vector}
|
285
|
+
* and the document embedding that is provided in
|
286
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}.
|
287
|
+
*
|
288
|
+
* If
|
289
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.SearchRequest.EmbeddingSpec.EmbeddingVector.field_path|SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
290
|
+
* is not provided, it will use
|
291
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.embedding_config|ServingConfig.EmbeddingConfig.field_path}.
|
292
|
+
* @param {string} request.rankingExpression
|
293
|
+
* The ranking expression controls the customized ranking on retrieval
|
294
|
+
* documents. This overrides
|
295
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.ranking_expression|ServingConfig.ranking_expression}.
|
296
|
+
* The ranking expression is a single function or multiple functions that are
|
297
|
+
* joined by "+".
|
298
|
+
*
|
299
|
+
* * ranking_expression = function, { " + ", function };
|
300
|
+
*
|
301
|
+
* Supported functions:
|
302
|
+
*
|
303
|
+
* * double * relevance_score
|
304
|
+
* * double * dotProduct(embedding_field_path)
|
305
|
+
*
|
306
|
+
* Function variables:
|
307
|
+
*
|
308
|
+
* * `relevance_score`: pre-defined keywords, used for measure relevance
|
309
|
+
* between query and document.
|
310
|
+
* * `embedding_field_path`: the document embedding field
|
311
|
+
* used with query embedding vector.
|
312
|
+
* * `dotProduct`: embedding function between embedding_field_path and query
|
313
|
+
* embedding vector.
|
314
|
+
*
|
315
|
+
* Example ranking expression:
|
316
|
+
*
|
317
|
+
* If document has an embedding field doc_embedding, the ranking expression
|
318
|
+
* could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
319
|
+
* @param {boolean} request.safeSearch
|
320
|
+
* Whether to turn on safe search. This is only supported for
|
321
|
+
* website search.
|
322
|
+
* @param {number[]} request.userLabels
|
323
|
+
* The user labels applied to a resource must meet the following requirements:
|
324
|
+
*
|
325
|
+
* * Each resource can have multiple labels, up to a maximum of 64.
|
326
|
+
* * Each label must be a key-value pair.
|
327
|
+
* * Keys have a minimum length of 1 character and a maximum length of 63
|
328
|
+
* characters and cannot be empty. Values can be empty and have a maximum
|
329
|
+
* length of 63 characters.
|
330
|
+
* * Keys and values can contain only lowercase letters, numeric characters,
|
331
|
+
* underscores, and dashes. All characters must use UTF-8 encoding, and
|
332
|
+
* international characters are allowed.
|
333
|
+
* * The key portion of a label must be unique. However, you can use the same
|
334
|
+
* key with multiple resources.
|
335
|
+
* * Keys must start with a lowercase letter or international character.
|
336
|
+
*
|
337
|
+
* See [Google Cloud
|
338
|
+
* Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
339
|
+
* for more details.
|
340
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.NaturalLanguageQueryUnderstandingSpec} request.naturalLanguageQueryUnderstandingSpec
|
341
|
+
* If `naturalLanguageQueryUnderstandingSpec` is not specified, no additional
|
342
|
+
* natural language query understanding will be done.
|
343
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SearchAsYouTypeSpec} request.searchAsYouTypeSpec
|
344
|
+
* Search as you type configuration. Only supported for the
|
345
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.IndustryVertical.MEDIA|IndustryVertical.MEDIA}
|
346
|
+
* vertical.
|
347
|
+
* @param {google.cloud.discoveryengine.v1alpha.CustomFineTuningSpec} request.customFineTuningSpec
|
348
|
+
* Custom fine tuning configs.
|
349
|
+
* If set, it has higher priority than the configs set in
|
350
|
+
* {@link protos.google.cloud.discoveryengine.v1alpha.ServingConfig.custom_fine_tuning_spec|ServingConfig.custom_fine_tuning_spec}.
|
351
|
+
* @param {string} request.session
|
352
|
+
* The session resource name. Optional.
|
353
|
+
*
|
354
|
+
* Session allows users to do multi-turn /search API calls or coordination
|
355
|
+
* between /search API calls and /answer API calls.
|
356
|
+
*
|
357
|
+
* Example #1 (multi-turn /search API calls):
|
358
|
+
* 1. Call /search API with the auto-session mode (see below).
|
359
|
+
* 2. Call /search API with the session ID generated in the first call.
|
360
|
+
* Here, the previous search query gets considered in query
|
361
|
+
* standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
362
|
+
* and the current query is "How about 2023?", the current query will
|
363
|
+
* be interpreted as "How did Alphabet do in 2023?".
|
364
|
+
*
|
365
|
+
* Example #2 (coordination between /search API calls and /answer API calls):
|
366
|
+
* 1. Call /search API with the auto-session mode (see below).
|
367
|
+
* 2. Call /answer API with the session ID generated in the first call.
|
368
|
+
* Here, the answer generation happens in the context of the search
|
369
|
+
* results from the first search call.
|
370
|
+
*
|
371
|
+
* Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
372
|
+
* gets automatically created. Otherwise, users can use the create-session API
|
373
|
+
* to create a session manually.
|
374
|
+
*
|
375
|
+
* Multi-turn Search feature is currently at private GA stage. Please use
|
376
|
+
* v1alpha or v1beta version instead before we launch this feature to public
|
377
|
+
* GA. Or ask for allowlisting through Google Support team.
|
378
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.SessionSpec} request.sessionSpec
|
379
|
+
* Session specification.
|
380
|
+
*
|
381
|
+
* Can be used only when `session` is set.
|
382
|
+
* @param {google.cloud.discoveryengine.v1alpha.SearchRequest.RelevanceThreshold} request.relevanceThreshold
|
383
|
+
* The relevance threshold of the search results.
|
384
|
+
*
|
385
|
+
* Default to Google defined threshold, leveraging a balance of
|
386
|
+
* precision and recall to deliver both highly accurate results and
|
387
|
+
* comprehensive coverage of relevant information.
|
388
|
+
* @param {object} [options]
|
389
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
390
|
+
* @returns {Promise} - The promise which resolves to an array.
|
391
|
+
* The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1alpha.SearchResponse.SearchResult|SearchResult}.
|
392
|
+
* The client library will perform auto-pagination by default: it will call the API as many
|
393
|
+
* times as needed and will merge results from all the pages into this array.
|
394
|
+
* Note that it can affect your quota.
|
395
|
+
* We recommend using `searchAsync()`
|
396
|
+
* method described below for async iteration which you can stop as needed.
|
397
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
398
|
+
* for more details and examples.
|
399
|
+
*/
|
400
400
|
search(request?: protos.google.cloud.discoveryengine.v1alpha.ISearchRequest, options?: CallOptions): Promise<[
|
401
401
|
protos.google.cloud.discoveryengine.v1alpha.SearchResponse.ISearchResult[],
|
402
402
|
protos.google.cloud.discoveryengine.v1alpha.ISearchRequest | null,
|
@@ -968,55 +968,55 @@ export declare class SearchServiceClient {
|
|
968
968
|
*/
|
969
969
|
searchAsync(request?: protos.google.cloud.discoveryengine.v1alpha.ISearchRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1alpha.SearchResponse.ISearchResult>;
|
970
970
|
/**
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
971
|
+
* Gets information about a location.
|
972
|
+
*
|
973
|
+
* @param {Object} request
|
974
|
+
* The request object that will be sent.
|
975
|
+
* @param {string} request.name
|
976
|
+
* Resource name for the location.
|
977
|
+
* @param {object} [options]
|
978
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
979
|
+
* @returns {Promise} - The promise which resolves to an array.
|
980
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
981
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
982
|
+
* for more details and examples.
|
983
|
+
* @example
|
984
|
+
* ```
|
985
|
+
* const [response] = await client.getLocation(request);
|
986
|
+
* ```
|
987
|
+
*/
|
988
988
|
getLocation(request: LocationProtos.google.cloud.location.IGetLocationRequest, options?: gax.CallOptions | Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>, callback?: Callback<LocationProtos.google.cloud.location.ILocation, LocationProtos.google.cloud.location.IGetLocationRequest | null | undefined, {} | null | undefined>): Promise<LocationProtos.google.cloud.location.ILocation>;
|
989
989
|
/**
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
990
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
991
|
+
*
|
992
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
993
|
+
* @param {Object} request
|
994
|
+
* The request object that will be sent.
|
995
|
+
* @param {string} request.name
|
996
|
+
* The resource that owns the locations collection, if applicable.
|
997
|
+
* @param {string} request.filter
|
998
|
+
* The standard list filter.
|
999
|
+
* @param {number} request.pageSize
|
1000
|
+
* The standard list page size.
|
1001
|
+
* @param {string} request.pageToken
|
1002
|
+
* The standard list page token.
|
1003
|
+
* @param {object} [options]
|
1004
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
1005
|
+
* @returns {Object}
|
1006
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
1007
|
+
* When you iterate the returned iterable, each element will be an object representing
|
1008
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
1009
|
+
* so you can stop the iteration when you don't need more results.
|
1010
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
1011
|
+
* for more details and examples.
|
1012
|
+
* @example
|
1013
|
+
* ```
|
1014
|
+
* const iterable = client.listLocationsAsync(request);
|
1015
|
+
* for await (const response of iterable) {
|
1016
|
+
* // process response
|
1017
|
+
* }
|
1018
|
+
* ```
|
1019
|
+
*/
|
1020
1020
|
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
1021
1021
|
/**
|
1022
1022
|
* Return a fully-qualified aclConfig resource name string.
|