google-cloud-discovery_engine-v1beta 0.10.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1beta/completion_service/rest/operations.rb +21 -6
- data/lib/google/cloud/discovery_engine/v1beta/control_service/client.rb +875 -0
- data/lib/google/cloud/discovery_engine/v1beta/control_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/control_service/paths.rb +167 -0
- data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/client.rb +814 -0
- data/lib/google/cloud/discovery_engine/v1beta/control_service/rest/service_stub.rb +440 -0
- data/lib/google/cloud/discovery_engine/v1beta/control_service/rest.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/control_service.rb +58 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +764 -6
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +199 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +715 -6
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +520 -0
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1beta/data_store_service/rest/operations.rb +21 -6
- data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +71 -37
- data/lib/google/cloud/discovery_engine/v1beta/document_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1beta/document_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +71 -37
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +21 -6
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/client.rb +312 -5
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/client.rb +291 -5
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/operations.rb +21 -6
- data/lib/google/cloud/discovery_engine/v1beta/engine_service/rest/service_stub.rb +180 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/client.rb +471 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/client.rb +438 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/grounded_generation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/project_service/client.rb +485 -0
- data/lib/google/cloud/discovery_engine/v1beta/project_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/project_service/operations.rb +809 -0
- data/lib/google/cloud/discovery_engine/v1beta/project_service/paths.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/client.rb +452 -0
- data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/operations.rb +1092 -0
- data/lib/google/cloud/discovery_engine/v1beta/project_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1beta/project_service/rest.rb +54 -0
- data/lib/google/cloud/discovery_engine/v1beta/project_service.rb +57 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/client.rb +481 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/client.rb +448 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/rank_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/paths.rb +66 -0
- data/lib/google/cloud/discovery_engine/v1beta/recommendation_service/rest/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1beta/rest.rb +4 -0
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +21 -6
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +26 -14
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +26 -14
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/client.rb +104 -2
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/client.rb +97 -2
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/operations.rb +21 -6
- data/lib/google/cloud/discovery_engine/v1beta/search_tuning_service/rest/service_stub.rb +59 -0
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1beta/serving_config_service/rest/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1beta/site_search_engine_service/rest/operations.rb +21 -6
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +21 -6
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/service_stub.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1beta.rb +4 -0
- data/lib/google/cloud/discoveryengine/v1beta/answer_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1beta/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1beta/control_pb.rb +55 -0
- data/lib/google/cloud/discoveryengine/v1beta/control_service_pb.rb +57 -0
- data/lib/google/cloud/discoveryengine/v1beta/control_service_services_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +32 -1
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1beta/custom_tuning_model_pb.rb +48 -0
- data/lib/google/cloud/discoveryengine/v1beta/document_processing_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/document_service_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1beta/document_service_services_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/engine_service_pb.rb +6 -1
- data/lib/google/cloud/discoveryengine/v1beta/engine_service_services_pb.rb +12 -0
- data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_pb.rb +52 -0
- data/lib/google/cloud/discoveryengine/v1beta/grounded_generation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/grounding_pb.rb +46 -0
- data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1beta/project_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1beta/project_service_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1beta/project_service_services_pb.rb +51 -0
- data/lib/google/cloud/discoveryengine/v1beta/rank_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1beta/rank_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +7 -1
- data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_pb.rb +5 -1
- data/lib/google/cloud/discoveryengine/v1beta/search_tuning_service_services_pb.rb +2 -0
- data/lib/google/cloud/discoveryengine/v1beta/session_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1beta/site_search_engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/answer.rb +362 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/common.rb +25 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/control.rb +209 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/control_service.rb +126 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +491 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/custom_tuning_model.rb +75 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/data_store_service.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_processing_config.rb +4 -5
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +9 -6
- data/proto_docs/google/cloud/discoveryengine/v1beta/engine.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1beta/engine_service.rb +51 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/grounded_generation_service.rb +144 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/grounding.rb +79 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +312 -26
- data/proto_docs/google/cloud/discoveryengine/v1beta/project.rb +106 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/project_service.rb +57 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/rank_service.rb +127 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/recommendation_service.rb +20 -19
- data/proto_docs/google/cloud/discoveryengine/v1beta/schema_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +181 -43
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_tuning_service.rb +47 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/session.rb +88 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/site_search_engine.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +25 -4
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +13 -1
- metadata +56 -2
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module Rest
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -181,12 +184,13 @@ module Google
|
|
181
184
|
# Customize the options with defaults
|
182
185
|
call_metadata = @config.rpcs.list_operations.metadata.to_h
|
183
186
|
|
184
|
-
# Set x-goog-api-client
|
187
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
185
188
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
186
189
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
187
190
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
|
188
191
|
transports_version_send: [:rest]
|
189
192
|
|
193
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
190
194
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
191
195
|
|
192
196
|
options.apply_defaults timeout: @config.rpcs.list_operations.timeout,
|
@@ -269,12 +273,13 @@ module Google
|
|
269
273
|
# Customize the options with defaults
|
270
274
|
call_metadata = @config.rpcs.get_operation.metadata.to_h
|
271
275
|
|
272
|
-
# Set x-goog-api-client
|
276
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
273
277
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
274
278
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
275
279
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
|
276
280
|
transports_version_send: [:rest]
|
277
281
|
|
282
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
278
283
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
279
284
|
|
280
285
|
options.apply_defaults timeout: @config.rpcs.get_operation.timeout,
|
@@ -351,12 +356,13 @@ module Google
|
|
351
356
|
# Customize the options with defaults
|
352
357
|
call_metadata = @config.rpcs.delete_operation.metadata.to_h
|
353
358
|
|
354
|
-
# Set x-goog-api-client
|
359
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
355
360
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
356
361
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
357
362
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
|
358
363
|
transports_version_send: [:rest]
|
359
364
|
|
365
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
360
366
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
361
367
|
|
362
368
|
options.apply_defaults timeout: @config.rpcs.delete_operation.timeout,
|
@@ -438,12 +444,13 @@ module Google
|
|
438
444
|
# Customize the options with defaults
|
439
445
|
call_metadata = @config.rpcs.cancel_operation.metadata.to_h
|
440
446
|
|
441
|
-
# Set x-goog-api-client
|
447
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
442
448
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
443
449
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
444
450
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
|
445
451
|
transports_version_send: [:rest]
|
446
452
|
|
453
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
447
454
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
448
455
|
|
449
456
|
options.apply_defaults timeout: @config.rpcs.cancel_operation.timeout,
|
@@ -1060,10 +1067,18 @@ module Google
|
|
1060
1067
|
transcoder = Gapic::Rest::GrpcTranscoder.new
|
1061
1068
|
.with_bindings(
|
1062
1069
|
uri_method: :post,
|
1063
|
-
uri_template: "/
|
1070
|
+
uri_template: "/v1beta/{name}:cancel",
|
1064
1071
|
body: "*",
|
1065
1072
|
matches: [
|
1066
|
-
["name", %r{^operations
|
1073
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/collections/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
|
1074
|
+
]
|
1075
|
+
)
|
1076
|
+
.with_bindings(
|
1077
|
+
uri_method: :post,
|
1078
|
+
uri_template: "/v1beta/{name}:cancel",
|
1079
|
+
body: "*",
|
1080
|
+
matches: [
|
1081
|
+
["name", %r{^projects/[^/]+/locations/[^/]+/dataStores/[^/]+/branches/[^/]+/operations/[^/]+/?$}, false]
|
1067
1082
|
]
|
1068
1083
|
)
|
1069
1084
|
transcoder.transcode request_pb
|
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# Service for search.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
API_VERSION = ""
|
36
|
+
|
34
37
|
# @private
|
35
38
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
36
39
|
|
@@ -68,9 +71,9 @@ module Google
|
|
68
71
|
end
|
69
72
|
default_config = Client::Configuration.new parent_config
|
70
73
|
|
71
|
-
default_config.timeout =
|
74
|
+
default_config.timeout = 30.0
|
72
75
|
default_config.retry_policy = {
|
73
|
-
initial_delay: 0
|
76
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
74
77
|
}
|
75
78
|
|
76
79
|
default_config
|
@@ -217,10 +220,14 @@ module Google
|
|
217
220
|
# Raw image query.
|
218
221
|
# @param page_size [::Integer]
|
219
222
|
# Maximum number of {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s
|
220
|
-
# to return.
|
221
|
-
#
|
223
|
+
# to return. The maximum allowed value depends on the data type. Values above
|
224
|
+
# the maximum value are coerced to the maximum value.
|
222
225
|
#
|
223
|
-
#
|
226
|
+
# * Websites with basic indexing: Default `10`, Maximum `25`.
|
227
|
+
# * Websites with advanced indexing: Default `25`, Maximum `50`.
|
228
|
+
# * Other: Default `50`, Maximum `100`.
|
229
|
+
#
|
230
|
+
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
224
231
|
# @param page_token [::String]
|
225
232
|
# A page token received from a previous
|
226
233
|
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Client#search SearchService.Search}
|
@@ -240,7 +247,10 @@ module Google
|
|
240
247
|
#
|
241
248
|
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
242
249
|
# @param data_store_specs [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::DataStoreSpec, ::Hash>]
|
243
|
-
#
|
250
|
+
# Specs defining dataStores to filter on in a search call and configurations
|
251
|
+
# for those dataStores. This is only considered for engines with multiple
|
252
|
+
# dataStores use case. For single dataStore within an engine, they should
|
253
|
+
# use the specs at the top level.
|
244
254
|
# @param filter [::String]
|
245
255
|
# The filter syntax consists of an expression language for constructing a
|
246
256
|
# predicate from one or more fields of the documents being filtered. Filter
|
@@ -274,7 +284,9 @@ module Google
|
|
274
284
|
# The order in which documents are returned. Documents can be ordered by
|
275
285
|
# a field in an {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}
|
276
286
|
# object. Leave it unset if ordered by relevance. `order_by` expression is
|
277
|
-
# case-sensitive.
|
287
|
+
# case-sensitive.
|
288
|
+
#
|
289
|
+
# For more information on ordering for retail search, see
|
278
290
|
# [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
279
291
|
#
|
280
292
|
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
@@ -291,7 +303,7 @@ module Google
|
|
291
303
|
# @param boost_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::BoostSpec, ::Hash]
|
292
304
|
# Boost specification to boost certain documents.
|
293
305
|
# For more information on boosting, see
|
294
|
-
# [Boosting](https://cloud.google.com/
|
306
|
+
# [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
|
295
307
|
# @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
|
296
308
|
# Additional search parameters.
|
297
309
|
#
|
@@ -299,8 +311,7 @@ module Google
|
|
299
311
|
#
|
300
312
|
# * `user_country_code`: string. Default empty. If set to non-empty, results
|
301
313
|
# are restricted or boosted based on the location provided.
|
302
|
-
#
|
303
|
-
# user_country_code: "au"
|
314
|
+
# For example, `user_country_code: "au"`
|
304
315
|
#
|
305
316
|
# For available codes see [Country
|
306
317
|
# Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
@@ -308,8 +319,7 @@ module Google
|
|
308
319
|
# * `search_type`: double. Default empty. Enables non-webpage searching
|
309
320
|
# depending on the value. The only valid non-default value is 1,
|
310
321
|
# which enables image searching.
|
311
|
-
#
|
312
|
-
# search_type: 1
|
322
|
+
# For example, `search_type: 1`
|
313
323
|
# @param query_expansion_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec, ::Hash]
|
314
324
|
# The query expansion specification that specifies the conditions under which
|
315
325
|
# query expansion occurs.
|
@@ -342,7 +352,8 @@ module Google
|
|
342
352
|
#
|
343
353
|
# If
|
344
354
|
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec::EmbeddingVector#field_path SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
345
|
-
# is not provided, it will use
|
355
|
+
# is not provided, it will use
|
356
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#embedding_config ServingConfig.EmbeddingConfig.field_path}.
|
346
357
|
# @param ranking_expression [::String]
|
347
358
|
# The ranking expression controls the customized ranking on retrieval
|
348
359
|
# documents. This overrides
|
@@ -424,10 +435,11 @@ module Google
|
|
424
435
|
# Customize the options with defaults
|
425
436
|
metadata = @config.rpcs.search.metadata.to_h
|
426
437
|
|
427
|
-
# Set x-goog-api-client
|
438
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
428
439
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
429
440
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
430
441
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
442
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
431
443
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
432
444
|
|
433
445
|
header_params = {}
|
@@ -33,6 +33,9 @@ module Google
|
|
33
33
|
# Service for search.
|
34
34
|
#
|
35
35
|
class Client
|
36
|
+
# @private
|
37
|
+
API_VERSION = ""
|
38
|
+
|
36
39
|
# @private
|
37
40
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
38
41
|
|
@@ -70,9 +73,9 @@ module Google
|
|
70
73
|
end
|
71
74
|
default_config = Client::Configuration.new parent_config
|
72
75
|
|
73
|
-
default_config.timeout =
|
76
|
+
default_config.timeout = 30.0
|
74
77
|
default_config.retry_policy = {
|
75
|
-
initial_delay: 0
|
78
|
+
initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14]
|
76
79
|
}
|
77
80
|
|
78
81
|
default_config
|
@@ -210,10 +213,14 @@ module Google
|
|
210
213
|
# Raw image query.
|
211
214
|
# @param page_size [::Integer]
|
212
215
|
# Maximum number of {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s
|
213
|
-
# to return.
|
214
|
-
#
|
216
|
+
# to return. The maximum allowed value depends on the data type. Values above
|
217
|
+
# the maximum value are coerced to the maximum value.
|
215
218
|
#
|
216
|
-
#
|
219
|
+
# * Websites with basic indexing: Default `10`, Maximum `25`.
|
220
|
+
# * Websites with advanced indexing: Default `25`, Maximum `50`.
|
221
|
+
# * Other: Default `50`, Maximum `100`.
|
222
|
+
#
|
223
|
+
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
217
224
|
# @param page_token [::String]
|
218
225
|
# A page token received from a previous
|
219
226
|
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchService::Rest::Client#search SearchService.Search}
|
@@ -233,7 +240,10 @@ module Google
|
|
233
240
|
#
|
234
241
|
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
235
242
|
# @param data_store_specs [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::DataStoreSpec, ::Hash>]
|
236
|
-
#
|
243
|
+
# Specs defining dataStores to filter on in a search call and configurations
|
244
|
+
# for those dataStores. This is only considered for engines with multiple
|
245
|
+
# dataStores use case. For single dataStore within an engine, they should
|
246
|
+
# use the specs at the top level.
|
237
247
|
# @param filter [::String]
|
238
248
|
# The filter syntax consists of an expression language for constructing a
|
239
249
|
# predicate from one or more fields of the documents being filtered. Filter
|
@@ -267,7 +277,9 @@ module Google
|
|
267
277
|
# The order in which documents are returned. Documents can be ordered by
|
268
278
|
# a field in an {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}
|
269
279
|
# object. Leave it unset if ordered by relevance. `order_by` expression is
|
270
|
-
# case-sensitive.
|
280
|
+
# case-sensitive.
|
281
|
+
#
|
282
|
+
# For more information on ordering for retail search, see
|
271
283
|
# [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
272
284
|
#
|
273
285
|
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
@@ -284,7 +296,7 @@ module Google
|
|
284
296
|
# @param boost_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::BoostSpec, ::Hash]
|
285
297
|
# Boost specification to boost certain documents.
|
286
298
|
# For more information on boosting, see
|
287
|
-
# [Boosting](https://cloud.google.com/
|
299
|
+
# [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
|
288
300
|
# @param params [::Hash{::String => ::Google::Protobuf::Value, ::Hash}]
|
289
301
|
# Additional search parameters.
|
290
302
|
#
|
@@ -292,8 +304,7 @@ module Google
|
|
292
304
|
#
|
293
305
|
# * `user_country_code`: string. Default empty. If set to non-empty, results
|
294
306
|
# are restricted or boosted based on the location provided.
|
295
|
-
#
|
296
|
-
# user_country_code: "au"
|
307
|
+
# For example, `user_country_code: "au"`
|
297
308
|
#
|
298
309
|
# For available codes see [Country
|
299
310
|
# Codes](https://developers.google.com/custom-search/docs/json_api_reference#countryCodes)
|
@@ -301,8 +312,7 @@ module Google
|
|
301
312
|
# * `search_type`: double. Default empty. Enables non-webpage searching
|
302
313
|
# depending on the value. The only valid non-default value is 1,
|
303
314
|
# which enables image searching.
|
304
|
-
#
|
305
|
-
# search_type: 1
|
315
|
+
# For example, `search_type: 1`
|
306
316
|
# @param query_expansion_spec [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec, ::Hash]
|
307
317
|
# The query expansion specification that specifies the conditions under which
|
308
318
|
# query expansion occurs.
|
@@ -335,7 +345,8 @@ module Google
|
|
335
345
|
#
|
336
346
|
# If
|
337
347
|
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::EmbeddingSpec::EmbeddingVector#field_path SearchRequest.EmbeddingSpec.EmbeddingVector.field_path}
|
338
|
-
# is not provided, it will use
|
348
|
+
# is not provided, it will use
|
349
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::ServingConfig#embedding_config ServingConfig.EmbeddingConfig.field_path}.
|
339
350
|
# @param ranking_expression [::String]
|
340
351
|
# The ranking expression controls the customized ranking on retrieval
|
341
352
|
# documents. This overrides
|
@@ -416,12 +427,13 @@ module Google
|
|
416
427
|
# Customize the options with defaults
|
417
428
|
call_metadata = @config.rpcs.search.metadata.to_h
|
418
429
|
|
419
|
-
# Set x-goog-api-client
|
430
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
420
431
|
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
421
432
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
422
433
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION,
|
423
434
|
transports_version_send: [:rest]
|
424
435
|
|
436
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
425
437
|
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
426
438
|
|
427
439
|
options.apply_defaults timeout: @config.rpcs.search.timeout,
|
@@ -31,6 +31,9 @@ module Google
|
|
31
31
|
# Service for search tuning.
|
32
32
|
#
|
33
33
|
class Client
|
34
|
+
# @private
|
35
|
+
API_VERSION = ""
|
36
|
+
|
34
37
|
# @private
|
35
38
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
36
39
|
|
@@ -202,7 +205,7 @@ module Google
|
|
202
205
|
# @param options [::Gapic::CallOptions, ::Hash]
|
203
206
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
204
207
|
#
|
205
|
-
# @overload train_custom_model(gcs_training_input: nil, data_store: nil, model_type: nil, error_config: nil)
|
208
|
+
# @overload train_custom_model(gcs_training_input: nil, data_store: nil, model_type: nil, error_config: nil, model_id: nil)
|
206
209
|
# Pass arguments to `train_custom_model` via keyword arguments. Note that at
|
207
210
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
208
211
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -220,6 +223,8 @@ module Google
|
|
220
223
|
# @param error_config [::Google::Cloud::DiscoveryEngine::V1beta::ImportErrorConfig, ::Hash]
|
221
224
|
# The desired location of errors incurred during the data ingestion and
|
222
225
|
# training.
|
226
|
+
# @param model_id [::String]
|
227
|
+
# If not provided, a UUID will be generated.
|
223
228
|
#
|
224
229
|
# @yield [response, operation] Access the result along with the RPC operation
|
225
230
|
# @yieldparam response [::Gapic::Operation]
|
@@ -262,10 +267,11 @@ module Google
|
|
262
267
|
# Customize the options with defaults
|
263
268
|
metadata = @config.rpcs.train_custom_model.metadata.to_h
|
264
269
|
|
265
|
-
# Set x-goog-api-client
|
270
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
266
271
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
267
272
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
268
273
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
274
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
269
275
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
270
276
|
|
271
277
|
header_params = {}
|
@@ -293,6 +299,95 @@ module Google
|
|
293
299
|
raise ::Google::Cloud::Error.from_error(e)
|
294
300
|
end
|
295
301
|
|
302
|
+
##
|
303
|
+
# Gets a list of all the custom models.
|
304
|
+
#
|
305
|
+
# @overload list_custom_models(request, options = nil)
|
306
|
+
# Pass arguments to `list_custom_models` via a request object, either of type
|
307
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest} or an equivalent Hash.
|
308
|
+
#
|
309
|
+
# @param request [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest, ::Hash]
|
310
|
+
# A request object representing the call parameters. Required. To specify no
|
311
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
312
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
313
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
314
|
+
#
|
315
|
+
# @overload list_custom_models(data_store: nil)
|
316
|
+
# Pass arguments to `list_custom_models` via keyword arguments. Note that at
|
317
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
318
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
319
|
+
#
|
320
|
+
# @param data_store [::String]
|
321
|
+
# Required. The resource name of the parent Data Store, such as
|
322
|
+
# `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
|
323
|
+
# This field is used to identify the data store where to fetch the models
|
324
|
+
# from.
|
325
|
+
#
|
326
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
327
|
+
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse]
|
328
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
329
|
+
#
|
330
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse]
|
331
|
+
#
|
332
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
333
|
+
#
|
334
|
+
# @example Basic example
|
335
|
+
# require "google/cloud/discovery_engine/v1beta"
|
336
|
+
#
|
337
|
+
# # Create a client object. The client can be reused for multiple calls.
|
338
|
+
# client = Google::Cloud::DiscoveryEngine::V1beta::SearchTuningService::Client.new
|
339
|
+
#
|
340
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
341
|
+
# request = Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest.new
|
342
|
+
#
|
343
|
+
# # Call the list_custom_models method.
|
344
|
+
# result = client.list_custom_models request
|
345
|
+
#
|
346
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsResponse.
|
347
|
+
# p result
|
348
|
+
#
|
349
|
+
def list_custom_models request, options = nil
|
350
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
351
|
+
|
352
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::DiscoveryEngine::V1beta::ListCustomModelsRequest
|
353
|
+
|
354
|
+
# Converts hash and nil to an options object
|
355
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
356
|
+
|
357
|
+
# Customize the options with defaults
|
358
|
+
metadata = @config.rpcs.list_custom_models.metadata.to_h
|
359
|
+
|
360
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
361
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
362
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
363
|
+
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
364
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
365
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
366
|
+
|
367
|
+
header_params = {}
|
368
|
+
if request.data_store
|
369
|
+
header_params["data_store"] = request.data_store
|
370
|
+
end
|
371
|
+
|
372
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
373
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
374
|
+
|
375
|
+
options.apply_defaults timeout: @config.rpcs.list_custom_models.timeout,
|
376
|
+
metadata: metadata,
|
377
|
+
retry_policy: @config.rpcs.list_custom_models.retry_policy
|
378
|
+
|
379
|
+
options.apply_defaults timeout: @config.timeout,
|
380
|
+
metadata: @config.metadata,
|
381
|
+
retry_policy: @config.retry_policy
|
382
|
+
|
383
|
+
@search_tuning_service_stub.call_rpc :list_custom_models, request, options: options do |response, operation|
|
384
|
+
yield response, operation if block_given?
|
385
|
+
return response
|
386
|
+
end
|
387
|
+
rescue ::GRPC::BadStatus => e
|
388
|
+
raise ::Google::Cloud::Error.from_error(e)
|
389
|
+
end
|
390
|
+
|
296
391
|
##
|
297
392
|
# Configuration class for the SearchTuningService API.
|
298
393
|
#
|
@@ -451,11 +546,18 @@ module Google
|
|
451
546
|
# @return [::Gapic::Config::Method]
|
452
547
|
#
|
453
548
|
attr_reader :train_custom_model
|
549
|
+
##
|
550
|
+
# RPC-specific configuration for `list_custom_models`
|
551
|
+
# @return [::Gapic::Config::Method]
|
552
|
+
#
|
553
|
+
attr_reader :list_custom_models
|
454
554
|
|
455
555
|
# @private
|
456
556
|
def initialize parent_rpcs = nil
|
457
557
|
train_custom_model_config = parent_rpcs.train_custom_model if parent_rpcs.respond_to? :train_custom_model
|
458
558
|
@train_custom_model = ::Gapic::Config::Method.new train_custom_model_config
|
559
|
+
list_custom_models_config = parent_rpcs.list_custom_models if parent_rpcs.respond_to? :list_custom_models
|
560
|
+
@list_custom_models = ::Gapic::Config::Method.new list_custom_models_config
|
459
561
|
|
460
562
|
yield self if block_given?
|
461
563
|
end
|
@@ -26,6 +26,9 @@ module Google
|
|
26
26
|
module SearchTuningService
|
27
27
|
# Service that implements Longrunning Operations API.
|
28
28
|
class Operations
|
29
|
+
# @private
|
30
|
+
API_VERSION = ""
|
31
|
+
|
29
32
|
# @private
|
30
33
|
DEFAULT_ENDPOINT_TEMPLATE = "discoveryengine.$UNIVERSE_DOMAIN$"
|
31
34
|
|
@@ -191,10 +194,11 @@ module Google
|
|
191
194
|
# Customize the options with defaults
|
192
195
|
metadata = @config.rpcs.list_operations.metadata.to_h
|
193
196
|
|
194
|
-
# Set x-goog-api-client
|
197
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
195
198
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
196
199
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
197
200
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
201
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
198
202
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
199
203
|
|
200
204
|
header_params = {}
|
@@ -287,10 +291,11 @@ module Google
|
|
287
291
|
# Customize the options with defaults
|
288
292
|
metadata = @config.rpcs.get_operation.metadata.to_h
|
289
293
|
|
290
|
-
# Set x-goog-api-client
|
294
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
291
295
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
292
296
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
293
297
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
298
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
294
299
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
295
300
|
|
296
301
|
header_params = {}
|
@@ -376,10 +381,11 @@ module Google
|
|
376
381
|
# Customize the options with defaults
|
377
382
|
metadata = @config.rpcs.delete_operation.metadata.to_h
|
378
383
|
|
379
|
-
# Set x-goog-api-client
|
384
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
380
385
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
381
386
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
382
387
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
388
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
383
389
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
384
390
|
|
385
391
|
header_params = {}
|
@@ -470,10 +476,11 @@ module Google
|
|
470
476
|
# Customize the options with defaults
|
471
477
|
metadata = @config.rpcs.cancel_operation.metadata.to_h
|
472
478
|
|
473
|
-
# Set x-goog-api-client
|
479
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
474
480
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
475
481
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
476
482
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
483
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
477
484
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
478
485
|
|
479
486
|
header_params = {}
|
@@ -574,10 +581,11 @@ module Google
|
|
574
581
|
# Customize the options with defaults
|
575
582
|
metadata = @config.rpcs.wait_operation.metadata.to_h
|
576
583
|
|
577
|
-
# Set x-goog-api-client
|
584
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
578
585
|
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
579
586
|
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
580
587
|
gapic_version: ::Google::Cloud::DiscoveryEngine::V1beta::VERSION
|
588
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
581
589
|
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
582
590
|
|
583
591
|
options.apply_defaults timeout: @config.rpcs.wait_operation.timeout,
|