@google-cloud/discoveryengine 0.8.0 → 1.1.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 +30 -0
- package/README.md +13 -1
- package/build/protos/google/cloud/discoveryengine/v1/common.proto +30 -2
- package/build/protos/google/cloud/discoveryengine/v1/completion_service.proto +15 -2
- package/build/protos/google/cloud/discoveryengine/v1/conversation.proto +114 -0
- package/build/protos/google/cloud/discoveryengine/v1/conversational_search_service.proto +303 -0
- package/build/protos/google/cloud/discoveryengine/v1/document.proto +8 -5
- package/build/protos/google/cloud/discoveryengine/v1/document_service.proto +4 -3
- package/build/protos/google/cloud/discoveryengine/v1/import_config.proto +27 -23
- package/build/protos/google/cloud/discoveryengine/v1/schema.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1/search_service.proto +428 -20
- package/build/protos/google/cloud/discoveryengine/v1/user_event.proto +48 -39
- package/build/protos/google/cloud/discoveryengine/v1/user_event_service.proto +2 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +7 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +13 -2
- package/build/protos/google/cloud/discoveryengine/v1beta/conversation.proto +138 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/conversational_search_service.proto +306 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +2 -4
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +2 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +17 -17
- package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +1 -1
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +276 -64
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +45 -36
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event_service.proto +2 -2
- package/build/protos/protos.d.ts +13913 -8367
- package/build/protos/protos.js +36766 -22883
- package/build/protos/protos.json +3956 -2571
- package/build/src/index.d.ts +4 -1
- package/build/src/index.js +4 -1
- package/build/src/v1/completion_service_client.d.ts +161 -12
- package/build/src/v1/completion_service_client.js +188 -4
- package/build/src/v1/conversational_search_service_client.d.ts +947 -0
- package/build/src/v1/conversational_search_service_client.js +1205 -0
- package/build/src/v1/conversational_search_service_client_config.json +68 -0
- package/build/src/v1/document_service_client.d.ts +245 -109
- package/build/src/v1/document_service_client.js +231 -31
- package/build/src/v1/index.d.ts +1 -0
- package/build/src/v1/index.js +3 -1
- package/build/src/v1/schema_service_client.d.ts +187 -53
- package/build/src/v1/schema_service_client.js +224 -27
- package/build/src/v1/search_service_client.d.ts +266 -59
- package/build/src/v1/search_service_client.js +267 -41
- package/build/src/v1/user_event_service_client.d.ts +159 -19
- package/build/src/v1/user_event_service_client.js +208 -7
- package/build/src/v1beta/completion_service_client.d.ts +159 -12
- package/build/src/v1beta/completion_service_client.js +188 -4
- package/build/src/v1beta/conversational_search_service_client.d.ts +947 -0
- package/build/src/v1beta/conversational_search_service_client.js +1205 -0
- package/build/src/v1beta/conversational_search_service_client_config.json +68 -0
- package/build/src/v1beta/document_service_client.d.ts +237 -101
- package/build/src/v1beta/document_service_client.js +227 -27
- package/build/src/v1beta/index.d.ts +1 -0
- package/build/src/v1beta/index.js +3 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +158 -15
- package/build/src/v1beta/recommendation_service_client.js +188 -4
- package/build/src/v1beta/schema_service_client.d.ts +187 -53
- package/build/src/v1beta/schema_service_client.js +224 -27
- package/build/src/v1beta/search_service_client.d.ts +305 -71
- package/build/src/v1beta/search_service_client.js +293 -49
- package/build/src/v1beta/user_event_service_client.d.ts +156 -16
- package/build/src/v1beta/user_event_service_client.js +208 -7
- package/package.json +10 -13
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import type * as gax from 'google-gax';
|
3
|
-
import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
|
3
|
+
import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, LocationsClient, LocationProtos } from 'google-gax';
|
4
4
|
import { Transform } from 'stream';
|
5
5
|
import * as protos from '../../protos/protos';
|
6
6
|
/**
|
@@ -22,6 +22,7 @@ export declare class SearchServiceClient {
|
|
22
22
|
innerApiCalls: {
|
23
23
|
[name: string]: Function;
|
24
24
|
};
|
25
|
+
locationsClient: LocationsClient;
|
25
26
|
pathTemplates: {
|
26
27
|
[name: string]: gax.PathTemplate;
|
27
28
|
};
|
@@ -56,8 +57,7 @@ export declare class SearchServiceClient {
|
|
56
57
|
* API remote host.
|
57
58
|
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
|
58
59
|
* Follows the structure of {@link gapicConfig}.
|
59
|
-
* @param {boolean
|
60
|
-
* Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
|
60
|
+
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
|
61
61
|
* For more information, please check the
|
62
62
|
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
|
63
63
|
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
|
@@ -65,7 +65,7 @@ export declare class SearchServiceClient {
|
|
65
65
|
* HTTP implementation. Load only fallback version and pass it to the constructor:
|
66
66
|
* ```
|
67
67
|
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
|
68
|
-
* const client = new SearchServiceClient({fallback:
|
68
|
+
* const client = new SearchServiceClient({fallback: true}, gax);
|
69
69
|
* ```
|
70
70
|
*/
|
71
71
|
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
|
@@ -125,27 +125,29 @@ export declare class SearchServiceClient {
|
|
125
125
|
* documents under the default branch.
|
126
126
|
* @param {string} request.query
|
127
127
|
* Raw search query.
|
128
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery} request.imageQuery
|
129
|
+
* Raw image query.
|
128
130
|
* @param {number} request.pageSize
|
129
|
-
* Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s
|
131
|
+
* Maximum number of {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s
|
130
132
|
* to return. If unspecified, defaults to a reasonable value. The maximum
|
131
|
-
* allowed value is 100. Values above 100
|
133
|
+
* allowed value is 100. Values above 100 are coerced to 100.
|
132
134
|
*
|
133
135
|
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
134
136
|
* @param {string} request.pageToken
|
135
137
|
* A page token received from a previous
|
136
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
138
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
137
139
|
* call. Provide this to retrieve the subsequent page.
|
138
140
|
*
|
139
141
|
* When paginating, all other parameters provided to
|
140
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
142
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
141
143
|
* must match the call that provided the page token. Otherwise, an
|
142
144
|
* `INVALID_ARGUMENT` error is returned.
|
143
145
|
* @param {number} request.offset
|
144
146
|
* A 0-indexed integer that specifies the current offset (that is, starting
|
145
147
|
* result location, amongst the
|
146
|
-
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
|
148
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
|
147
149
|
* as relevant) in search results. This field is only considered if
|
148
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
|
150
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
|
149
151
|
* is unset.
|
150
152
|
*
|
151
153
|
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
@@ -156,16 +158,17 @@ export declare class SearchServiceClient {
|
|
156
158
|
*
|
157
159
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
158
160
|
* @param {string} request.orderBy
|
159
|
-
* The order in which documents are returned.
|
160
|
-
* a field in an {@link google.cloud.discoveryengine.v1beta.Document|Document}
|
161
|
-
* object. Leave it unset if ordered by relevance.
|
161
|
+
* The order in which documents are returned. Documents can be ordered by
|
162
|
+
* a field in an {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}
|
163
|
+
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
162
164
|
* case-sensitive.
|
163
165
|
*
|
164
|
-
* If this field is unrecognizable, an
|
166
|
+
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
165
167
|
* @param {google.cloud.discoveryengine.v1beta.UserInfo} request.userInfo
|
166
168
|
* Information about the end user.
|
167
|
-
* Highly recommended for analytics.
|
168
|
-
*
|
169
|
+
* Highly recommended for analytics.
|
170
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
|
171
|
+
* is used to deduce `device_type` for analytics.
|
169
172
|
* @param {number[]} request.facetSpecs
|
170
173
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
171
174
|
*
|
@@ -185,10 +188,10 @@ export declare class SearchServiceClient {
|
|
185
188
|
* which enables image searching.
|
186
189
|
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
|
187
190
|
* The query expansion specification that specifies the conditions under which
|
188
|
-
* query expansion
|
191
|
+
* query expansion occurs.
|
189
192
|
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
|
190
193
|
* The spell correction specification that specifies the mode under
|
191
|
-
* which spell correction
|
194
|
+
* which spell correction takes effect.
|
192
195
|
* @param {string} request.userPseudoId
|
193
196
|
* A unique identifier for tracking visitors. For example, this could be
|
194
197
|
* implemented with an HTTP cookie, which should be able to uniquely identify
|
@@ -198,18 +201,46 @@ export declare class SearchServiceClient {
|
|
198
201
|
* This field should NOT have a fixed value such as `unknown_visitor`.
|
199
202
|
*
|
200
203
|
* This should be the same identifier as
|
201
|
-
* {@link google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
|
204
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
|
202
205
|
* and
|
203
|
-
* {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
|
206
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
|
204
207
|
*
|
205
208
|
* The field must be a UTF-8 encoded string with a length limit of 128
|
206
209
|
* characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
207
210
|
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec
|
208
|
-
*
|
209
|
-
*
|
211
|
+
* A specification for configuring the behavior of content search.
|
212
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} request.embeddingSpec
|
213
|
+
* Uses the provided embedding to do additional semantic document retrieval.
|
214
|
+
* The retrieval is based on the dot product of
|
215
|
+
* {@link protos.|SearchRequest.embedding_spec.embedding_vectors.vector} and the document
|
216
|
+
* embedding that is provided in
|
217
|
+
* {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path}.
|
218
|
+
*
|
219
|
+
* If {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path} is not
|
220
|
+
* provided, it will use {@link protos.|ServingConfig.embedding_config.field_paths}.
|
221
|
+
* @param {string} request.rankingExpression
|
222
|
+
* The ranking expression controls the customized ranking on retrieval
|
223
|
+
* documents. This overrides {@link protos.|ServingConfig.ranking_expression}.
|
224
|
+
* The ranking expression is a single function or multiple functions that are
|
225
|
+
* joint by "+".
|
226
|
+
* * ranking_expression = function, { " + ", function };
|
227
|
+
* Supported functions:
|
228
|
+
* * double * relevance_score
|
229
|
+
* * double * dotProduct(embedding_field_path)
|
230
|
+
* Function variables:
|
231
|
+
* `relevance_score`: pre-defined keywords, used for measure relevance
|
232
|
+
* between query and document.
|
233
|
+
* `embedding_field_path`: the document embedding field
|
234
|
+
* used with query embedding vector.
|
235
|
+
* `dotProduct`: embedding function between embedding_field_path and query
|
236
|
+
* embedding vector.
|
237
|
+
*
|
238
|
+
* Example ranking expression:
|
239
|
+
* If document has an embedding field doc_embedding, the ranking expression
|
240
|
+
* could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
210
241
|
* @param {boolean} request.safeSearch
|
211
242
|
* Whether to turn on safe search. This is only supported for
|
212
|
-
*
|
243
|
+
* website search.
|
213
244
|
* @param {number[]} request.userLabels
|
214
245
|
* The user labels applied to a resource must meet the following requirements:
|
215
246
|
*
|
@@ -231,14 +262,13 @@ export declare class SearchServiceClient {
|
|
231
262
|
* @param {object} [options]
|
232
263
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
233
264
|
* @returns {Promise} - The promise which resolves to an array.
|
234
|
-
* The first element of the array is Array of {@link google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult
|
265
|
+
* The first element of the array is Array of {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult}.
|
235
266
|
* The client library will perform auto-pagination by default: it will call the API as many
|
236
267
|
* times as needed and will merge results from all the pages into this array.
|
237
268
|
* Note that it can affect your quota.
|
238
269
|
* We recommend using `searchAsync()`
|
239
270
|
* method described below for async iteration which you can stop as needed.
|
240
|
-
* Please see the
|
241
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
271
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
242
272
|
* for more details and examples.
|
243
273
|
*/
|
244
274
|
search(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): Promise<[
|
@@ -265,27 +295,29 @@ export declare class SearchServiceClient {
|
|
265
295
|
* documents under the default branch.
|
266
296
|
* @param {string} request.query
|
267
297
|
* Raw search query.
|
298
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery} request.imageQuery
|
299
|
+
* Raw image query.
|
268
300
|
* @param {number} request.pageSize
|
269
|
-
* Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s
|
301
|
+
* Maximum number of {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s
|
270
302
|
* to return. If unspecified, defaults to a reasonable value. The maximum
|
271
|
-
* allowed value is 100. Values above 100
|
303
|
+
* allowed value is 100. Values above 100 are coerced to 100.
|
272
304
|
*
|
273
305
|
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
274
306
|
* @param {string} request.pageToken
|
275
307
|
* A page token received from a previous
|
276
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
308
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
277
309
|
* call. Provide this to retrieve the subsequent page.
|
278
310
|
*
|
279
311
|
* When paginating, all other parameters provided to
|
280
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
312
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
281
313
|
* must match the call that provided the page token. Otherwise, an
|
282
314
|
* `INVALID_ARGUMENT` error is returned.
|
283
315
|
* @param {number} request.offset
|
284
316
|
* A 0-indexed integer that specifies the current offset (that is, starting
|
285
317
|
* result location, amongst the
|
286
|
-
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
|
318
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
|
287
319
|
* as relevant) in search results. This field is only considered if
|
288
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
|
320
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
|
289
321
|
* is unset.
|
290
322
|
*
|
291
323
|
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
@@ -296,16 +328,17 @@ export declare class SearchServiceClient {
|
|
296
328
|
*
|
297
329
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
298
330
|
* @param {string} request.orderBy
|
299
|
-
* The order in which documents are returned.
|
300
|
-
* a field in an {@link google.cloud.discoveryengine.v1beta.Document|Document}
|
301
|
-
* object. Leave it unset if ordered by relevance.
|
331
|
+
* The order in which documents are returned. Documents can be ordered by
|
332
|
+
* a field in an {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}
|
333
|
+
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
302
334
|
* case-sensitive.
|
303
335
|
*
|
304
|
-
* If this field is unrecognizable, an
|
336
|
+
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
305
337
|
* @param {google.cloud.discoveryengine.v1beta.UserInfo} request.userInfo
|
306
338
|
* Information about the end user.
|
307
|
-
* Highly recommended for analytics.
|
308
|
-
*
|
339
|
+
* Highly recommended for analytics.
|
340
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
|
341
|
+
* is used to deduce `device_type` for analytics.
|
309
342
|
* @param {number[]} request.facetSpecs
|
310
343
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
311
344
|
*
|
@@ -325,10 +358,10 @@ export declare class SearchServiceClient {
|
|
325
358
|
* which enables image searching.
|
326
359
|
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
|
327
360
|
* The query expansion specification that specifies the conditions under which
|
328
|
-
* query expansion
|
361
|
+
* query expansion occurs.
|
329
362
|
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
|
330
363
|
* The spell correction specification that specifies the mode under
|
331
|
-
* which spell correction
|
364
|
+
* which spell correction takes effect.
|
332
365
|
* @param {string} request.userPseudoId
|
333
366
|
* A unique identifier for tracking visitors. For example, this could be
|
334
367
|
* implemented with an HTTP cookie, which should be able to uniquely identify
|
@@ -338,18 +371,46 @@ export declare class SearchServiceClient {
|
|
338
371
|
* This field should NOT have a fixed value such as `unknown_visitor`.
|
339
372
|
*
|
340
373
|
* This should be the same identifier as
|
341
|
-
* {@link google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
|
374
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
|
342
375
|
* and
|
343
|
-
* {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
|
376
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
|
344
377
|
*
|
345
378
|
* The field must be a UTF-8 encoded string with a length limit of 128
|
346
379
|
* characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
347
380
|
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec
|
348
|
-
*
|
349
|
-
*
|
381
|
+
* A specification for configuring the behavior of content search.
|
382
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} request.embeddingSpec
|
383
|
+
* Uses the provided embedding to do additional semantic document retrieval.
|
384
|
+
* The retrieval is based on the dot product of
|
385
|
+
* {@link protos.|SearchRequest.embedding_spec.embedding_vectors.vector} and the document
|
386
|
+
* embedding that is provided in
|
387
|
+
* {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path}.
|
388
|
+
*
|
389
|
+
* If {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path} is not
|
390
|
+
* provided, it will use {@link protos.|ServingConfig.embedding_config.field_paths}.
|
391
|
+
* @param {string} request.rankingExpression
|
392
|
+
* The ranking expression controls the customized ranking on retrieval
|
393
|
+
* documents. This overrides {@link protos.|ServingConfig.ranking_expression}.
|
394
|
+
* The ranking expression is a single function or multiple functions that are
|
395
|
+
* joint by "+".
|
396
|
+
* * ranking_expression = function, { " + ", function };
|
397
|
+
* Supported functions:
|
398
|
+
* * double * relevance_score
|
399
|
+
* * double * dotProduct(embedding_field_path)
|
400
|
+
* Function variables:
|
401
|
+
* `relevance_score`: pre-defined keywords, used for measure relevance
|
402
|
+
* between query and document.
|
403
|
+
* `embedding_field_path`: the document embedding field
|
404
|
+
* used with query embedding vector.
|
405
|
+
* `dotProduct`: embedding function between embedding_field_path and query
|
406
|
+
* embedding vector.
|
407
|
+
*
|
408
|
+
* Example ranking expression:
|
409
|
+
* If document has an embedding field doc_embedding, the ranking expression
|
410
|
+
* could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
350
411
|
* @param {boolean} request.safeSearch
|
351
412
|
* Whether to turn on safe search. This is only supported for
|
352
|
-
*
|
413
|
+
* website search.
|
353
414
|
* @param {number[]} request.userLabels
|
354
415
|
* The user labels applied to a resource must meet the following requirements:
|
355
416
|
*
|
@@ -371,13 +432,12 @@ export declare class SearchServiceClient {
|
|
371
432
|
* @param {object} [options]
|
372
433
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
373
434
|
* @returns {Stream}
|
374
|
-
* An object stream which emits an object representing {@link google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult
|
435
|
+
* An object stream which emits an object representing {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult} on 'data' event.
|
375
436
|
* The client library will perform auto-pagination by default: it will call the API as many
|
376
437
|
* times as needed. Note that it can affect your quota.
|
377
438
|
* We recommend using `searchAsync()`
|
378
439
|
* method described below for async iteration which you can stop as needed.
|
379
|
-
* Please see the
|
380
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
440
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
381
441
|
* for more details and examples.
|
382
442
|
*/
|
383
443
|
searchStream(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): Transform;
|
@@ -400,27 +460,29 @@ export declare class SearchServiceClient {
|
|
400
460
|
* documents under the default branch.
|
401
461
|
* @param {string} request.query
|
402
462
|
* Raw search query.
|
463
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.ImageQuery} request.imageQuery
|
464
|
+
* Raw image query.
|
403
465
|
* @param {number} request.pageSize
|
404
|
-
* Maximum number of {@link google.cloud.discoveryengine.v1beta.Document|Document}s
|
466
|
+
* Maximum number of {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s
|
405
467
|
* to return. If unspecified, defaults to a reasonable value. The maximum
|
406
|
-
* allowed value is 100. Values above 100
|
468
|
+
* allowed value is 100. Values above 100 are coerced to 100.
|
407
469
|
*
|
408
470
|
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
409
471
|
* @param {string} request.pageToken
|
410
472
|
* A page token received from a previous
|
411
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
473
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
412
474
|
* call. Provide this to retrieve the subsequent page.
|
413
475
|
*
|
414
476
|
* When paginating, all other parameters provided to
|
415
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
477
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchService.Search|SearchService.Search}
|
416
478
|
* must match the call that provided the page token. Otherwise, an
|
417
479
|
* `INVALID_ARGUMENT` error is returned.
|
418
480
|
* @param {number} request.offset
|
419
481
|
* A 0-indexed integer that specifies the current offset (that is, starting
|
420
482
|
* result location, amongst the
|
421
|
-
* {@link google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
|
483
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}s deemed by the API
|
422
484
|
* as relevant) in search results. This field is only considered if
|
423
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
|
485
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchRequest.page_token|page_token}
|
424
486
|
* is unset.
|
425
487
|
*
|
426
488
|
* If this field is negative, an `INVALID_ARGUMENT` is returned.
|
@@ -431,16 +493,17 @@ export declare class SearchServiceClient {
|
|
431
493
|
*
|
432
494
|
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
433
495
|
* @param {string} request.orderBy
|
434
|
-
* The order in which documents are returned.
|
435
|
-
* a field in an {@link google.cloud.discoveryengine.v1beta.Document|Document}
|
436
|
-
* object. Leave it unset if ordered by relevance.
|
496
|
+
* The order in which documents are returned. Documents can be ordered by
|
497
|
+
* a field in an {@link protos.google.cloud.discoveryengine.v1beta.Document|Document}
|
498
|
+
* object. Leave it unset if ordered by relevance. `order_by` expression is
|
437
499
|
* case-sensitive.
|
438
500
|
*
|
439
|
-
* If this field is unrecognizable, an
|
501
|
+
* If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
440
502
|
* @param {google.cloud.discoveryengine.v1beta.UserInfo} request.userInfo
|
441
503
|
* Information about the end user.
|
442
|
-
* Highly recommended for analytics.
|
443
|
-
*
|
504
|
+
* Highly recommended for analytics.
|
505
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.UserInfo.user_agent|UserInfo.user_agent}
|
506
|
+
* is used to deduce `device_type` for analytics.
|
444
507
|
* @param {number[]} request.facetSpecs
|
445
508
|
* Facet specifications for faceted search. If empty, no facets are returned.
|
446
509
|
*
|
@@ -460,10 +523,10 @@ export declare class SearchServiceClient {
|
|
460
523
|
* which enables image searching.
|
461
524
|
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec} request.queryExpansionSpec
|
462
525
|
* The query expansion specification that specifies the conditions under which
|
463
|
-
* query expansion
|
526
|
+
* query expansion occurs.
|
464
527
|
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec} request.spellCorrectionSpec
|
465
528
|
* The spell correction specification that specifies the mode under
|
466
|
-
* which spell correction
|
529
|
+
* which spell correction takes effect.
|
467
530
|
* @param {string} request.userPseudoId
|
468
531
|
* A unique identifier for tracking visitors. For example, this could be
|
469
532
|
* implemented with an HTTP cookie, which should be able to uniquely identify
|
@@ -473,18 +536,46 @@ export declare class SearchServiceClient {
|
|
473
536
|
* This field should NOT have a fixed value such as `unknown_visitor`.
|
474
537
|
*
|
475
538
|
* This should be the same identifier as
|
476
|
-
* {@link google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
|
539
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.UserEvent.user_pseudo_id|UserEvent.user_pseudo_id}
|
477
540
|
* and
|
478
|
-
* {@link google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
|
541
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.CompleteQueryRequest.user_pseudo_id|CompleteQueryRequest.user_pseudo_id}
|
479
542
|
*
|
480
543
|
* The field must be a UTF-8 encoded string with a length limit of 128
|
481
544
|
* characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
482
545
|
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec} request.contentSearchSpec
|
483
|
-
*
|
484
|
-
*
|
546
|
+
* A specification for configuring the behavior of content search.
|
547
|
+
* @param {google.cloud.discoveryengine.v1beta.SearchRequest.EmbeddingSpec} request.embeddingSpec
|
548
|
+
* Uses the provided embedding to do additional semantic document retrieval.
|
549
|
+
* The retrieval is based on the dot product of
|
550
|
+
* {@link protos.|SearchRequest.embedding_spec.embedding_vectors.vector} and the document
|
551
|
+
* embedding that is provided in
|
552
|
+
* {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path}.
|
553
|
+
*
|
554
|
+
* If {@link protos.|SearchRequest.embedding_spec.embedding_vectors.field_path} is not
|
555
|
+
* provided, it will use {@link protos.|ServingConfig.embedding_config.field_paths}.
|
556
|
+
* @param {string} request.rankingExpression
|
557
|
+
* The ranking expression controls the customized ranking on retrieval
|
558
|
+
* documents. This overrides {@link protos.|ServingConfig.ranking_expression}.
|
559
|
+
* The ranking expression is a single function or multiple functions that are
|
560
|
+
* joint by "+".
|
561
|
+
* * ranking_expression = function, { " + ", function };
|
562
|
+
* Supported functions:
|
563
|
+
* * double * relevance_score
|
564
|
+
* * double * dotProduct(embedding_field_path)
|
565
|
+
* Function variables:
|
566
|
+
* `relevance_score`: pre-defined keywords, used for measure relevance
|
567
|
+
* between query and document.
|
568
|
+
* `embedding_field_path`: the document embedding field
|
569
|
+
* used with query embedding vector.
|
570
|
+
* `dotProduct`: embedding function between embedding_field_path and query
|
571
|
+
* embedding vector.
|
572
|
+
*
|
573
|
+
* Example ranking expression:
|
574
|
+
* If document has an embedding field doc_embedding, the ranking expression
|
575
|
+
* could be `0.5 * relevance_score + 0.3 * dotProduct(doc_embedding)`.
|
485
576
|
* @param {boolean} request.safeSearch
|
486
577
|
* Whether to turn on safe search. This is only supported for
|
487
|
-
*
|
578
|
+
* website search.
|
488
579
|
* @param {number[]} request.userLabels
|
489
580
|
* The user labels applied to a resource must meet the following requirements:
|
490
581
|
*
|
@@ -506,17 +597,67 @@ export declare class SearchServiceClient {
|
|
506
597
|
* @param {object} [options]
|
507
598
|
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
508
599
|
* @returns {Object}
|
509
|
-
* An iterable Object that allows
|
600
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
510
601
|
* When you iterate the returned iterable, each element will be an object representing
|
511
|
-
* {@link google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult
|
602
|
+
* {@link protos.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult|SearchResult}. The API will be called under the hood as needed, once per the page,
|
512
603
|
* so you can stop the iteration when you don't need more results.
|
513
|
-
* Please see the
|
514
|
-
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
|
604
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
515
605
|
* for more details and examples.
|
516
606
|
* @example <caption>include:samples/generated/v1beta/search_service.search.js</caption>
|
517
607
|
* region_tag:discoveryengine_v1beta_generated_SearchService_Search_async
|
518
608
|
*/
|
519
609
|
searchAsync(request?: protos.google.cloud.discoveryengine.v1beta.ISearchRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.discoveryengine.v1beta.SearchResponse.ISearchResult>;
|
610
|
+
/**
|
611
|
+
* Gets information about a location.
|
612
|
+
*
|
613
|
+
* @param {Object} request
|
614
|
+
* The request object that will be sent.
|
615
|
+
* @param {string} request.name
|
616
|
+
* Resource name for the location.
|
617
|
+
* @param {object} [options]
|
618
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html | CallOptions} for more details.
|
619
|
+
* @returns {Promise} - The promise which resolves to an array.
|
620
|
+
* The first element of the array is an object representing {@link google.cloud.location.Location | Location}.
|
621
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
|
622
|
+
* for more details and examples.
|
623
|
+
* @example
|
624
|
+
* ```
|
625
|
+
* const [response] = await client.getLocation(request);
|
626
|
+
* ```
|
627
|
+
*/
|
628
|
+
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>;
|
629
|
+
/**
|
630
|
+
* Lists information about the supported locations for this service. Returns an iterable object.
|
631
|
+
*
|
632
|
+
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
|
633
|
+
* @param {Object} request
|
634
|
+
* The request object that will be sent.
|
635
|
+
* @param {string} request.name
|
636
|
+
* The resource that owns the locations collection, if applicable.
|
637
|
+
* @param {string} request.filter
|
638
|
+
* The standard list filter.
|
639
|
+
* @param {number} request.pageSize
|
640
|
+
* The standard list page size.
|
641
|
+
* @param {string} request.pageToken
|
642
|
+
* The standard list page token.
|
643
|
+
* @param {object} [options]
|
644
|
+
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
|
645
|
+
* @returns {Object}
|
646
|
+
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
|
647
|
+
* When you iterate the returned iterable, each element will be an object representing
|
648
|
+
* {@link google.cloud.location.Location | Location}. The API will be called under the hood as needed, once per the page,
|
649
|
+
* so you can stop the iteration when you don't need more results.
|
650
|
+
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
|
651
|
+
* for more details and examples.
|
652
|
+
* @example
|
653
|
+
* ```
|
654
|
+
* const iterable = client.listLocationsAsync(request);
|
655
|
+
* for await (const response of iterable) {
|
656
|
+
* // process response
|
657
|
+
* }
|
658
|
+
* ```
|
659
|
+
*/
|
660
|
+
listLocationsAsync(request: LocationProtos.google.cloud.location.IListLocationsRequest, options?: CallOptions): AsyncIterable<LocationProtos.google.cloud.location.ILocation>;
|
520
661
|
/**
|
521
662
|
* Return a fully-qualified projectLocationCollectionDataStoreBranch resource name string.
|
522
663
|
*
|
@@ -628,6 +769,57 @@ export declare class SearchServiceClient {
|
|
628
769
|
* @returns {string} A string representing the document.
|
629
770
|
*/
|
630
771
|
matchDocumentFromProjectLocationCollectionDataStoreBranchDocumentName(projectLocationCollectionDataStoreBranchDocumentName: string): string | number;
|
772
|
+
/**
|
773
|
+
* Return a fully-qualified projectLocationCollectionDataStoreConversation resource name string.
|
774
|
+
*
|
775
|
+
* @param {string} project
|
776
|
+
* @param {string} location
|
777
|
+
* @param {string} collection
|
778
|
+
* @param {string} data_store
|
779
|
+
* @param {string} conversation
|
780
|
+
* @returns {string} Resource name string.
|
781
|
+
*/
|
782
|
+
projectLocationCollectionDataStoreConversationPath(project: string, location: string, collection: string, dataStore: string, conversation: string): string;
|
783
|
+
/**
|
784
|
+
* Parse the project from ProjectLocationCollectionDataStoreConversation resource.
|
785
|
+
*
|
786
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
787
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
788
|
+
* @returns {string} A string representing the project.
|
789
|
+
*/
|
790
|
+
matchProjectFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
791
|
+
/**
|
792
|
+
* Parse the location from ProjectLocationCollectionDataStoreConversation resource.
|
793
|
+
*
|
794
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
795
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
796
|
+
* @returns {string} A string representing the location.
|
797
|
+
*/
|
798
|
+
matchLocationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
799
|
+
/**
|
800
|
+
* Parse the collection from ProjectLocationCollectionDataStoreConversation resource.
|
801
|
+
*
|
802
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
803
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
804
|
+
* @returns {string} A string representing the collection.
|
805
|
+
*/
|
806
|
+
matchCollectionFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
807
|
+
/**
|
808
|
+
* Parse the data_store from ProjectLocationCollectionDataStoreConversation resource.
|
809
|
+
*
|
810
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
811
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
812
|
+
* @returns {string} A string representing the data_store.
|
813
|
+
*/
|
814
|
+
matchDataStoreFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
815
|
+
/**
|
816
|
+
* Parse the conversation from ProjectLocationCollectionDataStoreConversation resource.
|
817
|
+
*
|
818
|
+
* @param {string} projectLocationCollectionDataStoreConversationName
|
819
|
+
* A fully-qualified path representing project_location_collection_data_store_conversation resource.
|
820
|
+
* @returns {string} A string representing the conversation.
|
821
|
+
*/
|
822
|
+
matchConversationFromProjectLocationCollectionDataStoreConversationName(projectLocationCollectionDataStoreConversationName: string): string | number;
|
631
823
|
/**
|
632
824
|
* Return a fully-qualified projectLocationCollectionDataStoreSchema resource name string.
|
633
825
|
*
|
@@ -823,6 +1015,48 @@ export declare class SearchServiceClient {
|
|
823
1015
|
* @returns {string} A string representing the document.
|
824
1016
|
*/
|
825
1017
|
matchDocumentFromProjectLocationDataStoreBranchDocumentName(projectLocationDataStoreBranchDocumentName: string): string | number;
|
1018
|
+
/**
|
1019
|
+
* Return a fully-qualified projectLocationDataStoreConversation resource name string.
|
1020
|
+
*
|
1021
|
+
* @param {string} project
|
1022
|
+
* @param {string} location
|
1023
|
+
* @param {string} data_store
|
1024
|
+
* @param {string} conversation
|
1025
|
+
* @returns {string} Resource name string.
|
1026
|
+
*/
|
1027
|
+
projectLocationDataStoreConversationPath(project: string, location: string, dataStore: string, conversation: string): string;
|
1028
|
+
/**
|
1029
|
+
* Parse the project from ProjectLocationDataStoreConversation resource.
|
1030
|
+
*
|
1031
|
+
* @param {string} projectLocationDataStoreConversationName
|
1032
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1033
|
+
* @returns {string} A string representing the project.
|
1034
|
+
*/
|
1035
|
+
matchProjectFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
|
1036
|
+
/**
|
1037
|
+
* Parse the location from ProjectLocationDataStoreConversation resource.
|
1038
|
+
*
|
1039
|
+
* @param {string} projectLocationDataStoreConversationName
|
1040
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1041
|
+
* @returns {string} A string representing the location.
|
1042
|
+
*/
|
1043
|
+
matchLocationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
|
1044
|
+
/**
|
1045
|
+
* Parse the data_store from ProjectLocationDataStoreConversation resource.
|
1046
|
+
*
|
1047
|
+
* @param {string} projectLocationDataStoreConversationName
|
1048
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1049
|
+
* @returns {string} A string representing the data_store.
|
1050
|
+
*/
|
1051
|
+
matchDataStoreFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
|
1052
|
+
/**
|
1053
|
+
* Parse the conversation from ProjectLocationDataStoreConversation resource.
|
1054
|
+
*
|
1055
|
+
* @param {string} projectLocationDataStoreConversationName
|
1056
|
+
* A fully-qualified path representing project_location_data_store_conversation resource.
|
1057
|
+
* @returns {string} A string representing the conversation.
|
1058
|
+
*/
|
1059
|
+
matchConversationFromProjectLocationDataStoreConversationName(projectLocationDataStoreConversationName: string): string | number;
|
826
1060
|
/**
|
827
1061
|
* Return a fully-qualified projectLocationDataStoreSchema resource name string.
|
828
1062
|
*
|