google-cloud-discovery_engine-v1beta 0.2.1 → 0.4.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/rest/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/client.rb +925 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/paths.rb +176 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/client.rb +763 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest/service_stub.rb +450 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1beta/conversational_search_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1beta/document_service/client.rb +6 -5
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/client.rb +6 -5
- data/lib/google/cloud/discovery_engine/v1beta/document_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1beta/rest.rb +2 -1
- data/lib/google/cloud/discovery_engine/v1beta/schema_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1beta/search_service/client.rb +14 -12
- data/lib/google/cloud/discovery_engine/v1beta/search_service/rest/client.rb +14 -12
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/client.rb +5 -5
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/client.rb +5 -5
- data/lib/google/cloud/discovery_engine/v1beta/user_event_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1beta/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1beta.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1beta/completion_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/conversation_pb.rb +53 -0
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_pb.rb +61 -0
- data/lib/google/cloud/discoveryengine/v1beta/conversational_search_service_services_pb.rb +67 -0
- data/lib/google/cloud/discoveryengine/v1beta/import_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1beta/search_service_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1beta/user_event_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/common.rb +1 -2
- data/proto_docs/google/cloud/discoveryengine/v1beta/completion_service.rb +15 -2
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversation.rb +134 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/conversational_search_service.rb +175 -0
- data/proto_docs/google/cloud/discoveryengine/v1beta/document.rb +6 -5
- data/proto_docs/google/cloud/discoveryengine/v1beta/document_service.rb +2 -1
- data/proto_docs/google/cloud/discoveryengine/v1beta/import_config.rb +22 -18
- data/proto_docs/google/cloud/discoveryengine/v1beta/search_service.rb +194 -44
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event.rb +37 -29
- data/proto_docs/google/cloud/discoveryengine/v1beta/user_event_service.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +15 -2
@@ -44,11 +44,15 @@ module Google
|
|
44
44
|
# have a valid
|
45
45
|
# {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}.
|
46
46
|
# * `content`: Unstructured data (e.g. PDF, HTML). Each file matched by
|
47
|
-
# `input_uris`
|
47
|
+
# `input_uris` becomes a document, with the ID set to the first 128
|
48
48
|
# bits of SHA256(URI) encoded as a hex string.
|
49
49
|
# * `custom`: One custom data JSON per row in arbitrary format that conforms
|
50
|
-
# the defined {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of
|
51
|
-
# data store. This can only be used by
|
50
|
+
# to the defined {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of
|
51
|
+
# the data store. This can only be used by Gen App Builder.
|
52
|
+
# * `csv`: A CSV file with header conforming to the defined
|
53
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of the
|
54
|
+
# data store. Each entry after the header is imported as a Document.
|
55
|
+
# This can only be used by Gen App Builder.
|
52
56
|
#
|
53
57
|
# Supported values for user even imports:
|
54
58
|
#
|
@@ -99,9 +103,9 @@ module Google
|
|
99
103
|
# {::Google::Cloud::DiscoveryEngine::V1beta::Document#json_data Document.json_data}
|
100
104
|
# or
|
101
105
|
# {::Google::Cloud::DiscoveryEngine::V1beta::Document#struct_data Document.struct_data}.
|
102
|
-
# * `custom`: One custom data per row in arbitrary format that conforms
|
103
|
-
# defined {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of the
|
104
|
-
# store. This can only be used by
|
106
|
+
# * `custom`: One custom data per row in arbitrary format that conforms to
|
107
|
+
# the defined {::Google::Cloud::DiscoveryEngine::V1beta::Schema Schema} of the
|
108
|
+
# data store. This can only be used by Gen App Builder.
|
105
109
|
class BigQuerySource
|
106
110
|
include ::Google::Protobuf::MessageExts
|
107
111
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -111,7 +115,7 @@ module Google
|
|
111
115
|
# @!attribute [rw] gcs_prefix
|
112
116
|
# @return [::String]
|
113
117
|
# Cloud Storage prefix for import errors. This must be an empty,
|
114
|
-
# existing Cloud Storage directory. Import errors
|
118
|
+
# existing Cloud Storage directory. Import errors are written to
|
115
119
|
# sharded files in this directory, one per line, as a JSON-encoded
|
116
120
|
# `google.rpc.Status` message.
|
117
121
|
class ImportErrorConfig
|
@@ -122,13 +126,13 @@ module Google
|
|
122
126
|
# Request message for the ImportUserEvents request.
|
123
127
|
# @!attribute [rw] inline_source
|
124
128
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::ImportUserEventsRequest::InlineSource]
|
125
|
-
#
|
129
|
+
# The Inline source for the input content for UserEvents.
|
126
130
|
# @!attribute [rw] gcs_source
|
127
131
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::GcsSource]
|
128
|
-
#
|
132
|
+
# Cloud Storage location for the input content.
|
129
133
|
# @!attribute [rw] bigquery_source
|
130
134
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource]
|
131
|
-
#
|
135
|
+
# BigQuery input source.
|
132
136
|
# @!attribute [rw] parent
|
133
137
|
# @return [::String]
|
134
138
|
# Required. Parent DataStore resource name, of the form
|
@@ -173,7 +177,7 @@ module Google
|
|
173
177
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
174
178
|
end
|
175
179
|
|
176
|
-
# Metadata related to the progress of the Import operation. This
|
180
|
+
# Metadata related to the progress of the Import operation. This is
|
177
181
|
# returned by the google.longrunning.Operation.metadata field.
|
178
182
|
# @!attribute [rw] create_time
|
179
183
|
# @return [::Google::Protobuf::Timestamp]
|
@@ -193,8 +197,8 @@ module Google
|
|
193
197
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
194
198
|
end
|
195
199
|
|
196
|
-
# Metadata related to the progress of the ImportDocuments operation. This
|
197
|
-
#
|
200
|
+
# Metadata related to the progress of the ImportDocuments operation. This is
|
201
|
+
# returned by the google.longrunning.Operation.metadata field.
|
198
202
|
# @!attribute [rw] create_time
|
199
203
|
# @return [::Google::Protobuf::Timestamp]
|
200
204
|
# Operation create time.
|
@@ -249,7 +253,7 @@ module Google
|
|
249
253
|
# `false`, {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}s
|
250
254
|
# have to be specified using
|
251
255
|
# {::Google::Cloud::DiscoveryEngine::V1beta::ImportDocumentsRequest#id_field id_field},
|
252
|
-
#
|
256
|
+
# otherwise, documents without IDs fail to be imported.
|
253
257
|
#
|
254
258
|
# Only set this field when using
|
255
259
|
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} or
|
@@ -258,7 +262,7 @@ module Google
|
|
258
262
|
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource#data_schema GcsSource.data_schema}
|
259
263
|
# or
|
260
264
|
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource#data_schema BigQuerySource.data_schema}
|
261
|
-
# is `custom`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
265
|
+
# is `custom` or `csv`. Otherwise, an INVALID_ARGUMENT error is thrown.
|
262
266
|
# @!attribute [rw] id_field
|
263
267
|
# @return [::String]
|
264
268
|
# The field in the Cloud Storage and BigQuery sources that indicates the
|
@@ -270,12 +274,12 @@ module Google
|
|
270
274
|
# {::Google::Cloud::DiscoveryEngine::V1beta::BigQuerySource BigQuerySource} it is
|
271
275
|
# the column name of the BigQuery table where the unique ids are stored.
|
272
276
|
#
|
273
|
-
# The values of the JSON field or the BigQuery column
|
277
|
+
# The values of the JSON field or the BigQuery column are used as the
|
274
278
|
# {::Google::Cloud::DiscoveryEngine::V1beta::Document#id Document.id}s. The JSON
|
275
279
|
# field or the BigQuery column must be of string type, and the values must be
|
276
280
|
# set as valid strings conform to
|
277
281
|
# [RFC-1034](https://tools.ietf.org/html/rfc1034) with 1-63 characters.
|
278
|
-
# Otherwise, documents without valid IDs
|
282
|
+
# Otherwise, documents without valid IDs fail to be imported.
|
279
283
|
#
|
280
284
|
# Only set this field when using
|
281
285
|
# {::Google::Cloud::DiscoveryEngine::V1beta::GcsSource GcsSource} or
|
@@ -308,7 +312,7 @@ module Google
|
|
308
312
|
# Indicates how imported documents are reconciled with the existing documents
|
309
313
|
# created or imported before.
|
310
314
|
module ReconciliationMode
|
311
|
-
# Defaults to INCREMENTAL
|
315
|
+
# Defaults to `INCREMENTAL`.
|
312
316
|
RECONCILIATION_MODE_UNSPECIFIED = 0
|
313
317
|
|
314
318
|
# Inserts new documents or updates existing documents.
|
@@ -40,11 +40,14 @@ module Google
|
|
40
40
|
# @!attribute [rw] query
|
41
41
|
# @return [::String]
|
42
42
|
# Raw search query.
|
43
|
+
# @!attribute [rw] image_query
|
44
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ImageQuery]
|
45
|
+
# Raw image query.
|
43
46
|
# @!attribute [rw] page_size
|
44
47
|
# @return [::Integer]
|
45
48
|
# Maximum number of {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}s
|
46
49
|
# to return. If unspecified, defaults to a reasonable value. The maximum
|
47
|
-
# allowed value is 100. Values above 100
|
50
|
+
# allowed value is 100. Values above 100 are coerced to 100.
|
48
51
|
#
|
49
52
|
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
50
53
|
# @!attribute [rw] page_token
|
@@ -76,17 +79,18 @@ module Google
|
|
76
79
|
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
77
80
|
# @!attribute [rw] order_by
|
78
81
|
# @return [::String]
|
79
|
-
# The order in which documents are returned.
|
82
|
+
# The order in which documents are returned. Documents can be ordered by
|
80
83
|
# a field in an {::Google::Cloud::DiscoveryEngine::V1beta::Document Document}
|
81
|
-
# object. Leave it unset if ordered by relevance.
|
84
|
+
# object. Leave it unset if ordered by relevance. `order_by` expression is
|
82
85
|
# case-sensitive.
|
83
86
|
#
|
84
|
-
# If this field is unrecognizable, an
|
87
|
+
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
85
88
|
# @!attribute [rw] user_info
|
86
89
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::UserInfo]
|
87
90
|
# Information about the end user.
|
88
|
-
# Highly recommended for analytics.
|
89
|
-
#
|
91
|
+
# Highly recommended for analytics.
|
92
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::UserInfo#user_agent UserInfo.user_agent}
|
93
|
+
# is used to deduce `device_type` for analytics.
|
90
94
|
# @!attribute [rw] facet_specs
|
91
95
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec>]
|
92
96
|
# Facet specifications for faceted search. If empty, no facets are returned.
|
@@ -110,11 +114,11 @@ module Google
|
|
110
114
|
# @!attribute [rw] query_expansion_spec
|
111
115
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::QueryExpansionSpec]
|
112
116
|
# The query expansion specification that specifies the conditions under which
|
113
|
-
# query expansion
|
117
|
+
# query expansion occurs.
|
114
118
|
# @!attribute [rw] spell_correction_spec
|
115
119
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::SpellCorrectionSpec]
|
116
120
|
# The spell correction specification that specifies the mode under
|
117
|
-
# which spell correction
|
121
|
+
# which spell correction takes effect.
|
118
122
|
# @!attribute [rw] user_pseudo_id
|
119
123
|
# @return [::String]
|
120
124
|
# A unique identifier for tracking visitors. For example, this could be
|
@@ -133,12 +137,11 @@ module Google
|
|
133
137
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
134
138
|
# @!attribute [rw] content_search_spec
|
135
139
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec]
|
136
|
-
#
|
137
|
-
# search.
|
140
|
+
# A specification for configuring the behavior of content search.
|
138
141
|
# @!attribute [rw] safe_search
|
139
142
|
# @return [::Boolean]
|
140
143
|
# Whether to turn on safe search. This is only supported for
|
141
|
-
#
|
144
|
+
# website search.
|
142
145
|
# @!attribute [rw] user_labels
|
143
146
|
# @return [::Google::Protobuf::Map{::String => ::String}]
|
144
147
|
# The user labels applied to a resource must meet the following requirements:
|
@@ -162,6 +165,16 @@ module Google
|
|
162
165
|
include ::Google::Protobuf::MessageExts
|
163
166
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
164
167
|
|
168
|
+
# Specifies the image query input.
|
169
|
+
# @!attribute [rw] image_bytes
|
170
|
+
# @return [::String]
|
171
|
+
# Base64 encoded image bytes. Supported image formats: JPEG, PNG, and
|
172
|
+
# BMP.
|
173
|
+
class ImageQuery
|
174
|
+
include ::Google::Protobuf::MessageExts
|
175
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
176
|
+
end
|
177
|
+
|
165
178
|
# A facet specification to perform faceted search.
|
166
179
|
# @!attribute [rw] facet_key
|
167
180
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::FacetSpec::FacetKey]
|
@@ -170,7 +183,7 @@ module Google
|
|
170
183
|
# @return [::Integer]
|
171
184
|
# Maximum of facet values that should be returned for this facet. If
|
172
185
|
# unspecified, defaults to 20. The maximum allowed value is 300. Values
|
173
|
-
# above 300
|
186
|
+
# above 300 are coerced to 300.
|
174
187
|
#
|
175
188
|
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
176
189
|
# @!attribute [rw] excluded_filter_keys
|
@@ -207,15 +220,15 @@ module Google
|
|
207
220
|
# @return [::Boolean]
|
208
221
|
# Enables dynamic position for this facet. If set to true, the position of
|
209
222
|
# this facet among all facets in the response is determined automatically.
|
210
|
-
#
|
211
|
-
#
|
212
|
-
# response
|
223
|
+
# If dynamic facets are enabled, it is ordered together.
|
224
|
+
# If set to false, the position of this facet in the
|
225
|
+
# response is the same as in the request, and it is ranked before
|
213
226
|
# the facets with dynamic position enable and all dynamic facets.
|
214
227
|
#
|
215
228
|
# For example, you may always want to have rating facet returned in
|
216
229
|
# the response, but it's not necessarily to always display the rating facet
|
217
230
|
# at the top. In that case, you can set enable_dynamic_position to true so
|
218
|
-
# that the position of rating facet in response
|
231
|
+
# that the position of rating facet in response is determined
|
219
232
|
# automatically.
|
220
233
|
#
|
221
234
|
# Another example, assuming you have the following facets in the request:
|
@@ -226,13 +239,13 @@ module Google
|
|
226
239
|
#
|
227
240
|
# * "brands", enable_dynamic_position = false
|
228
241
|
#
|
229
|
-
# And also you have a dynamic facets
|
230
|
-
#
|
242
|
+
# And also you have a dynamic facets enabled, which generates a facet
|
243
|
+
# `gender`. Then the final order of the facets in the response can be
|
231
244
|
# ("price", "brands", "rating", "gender") or ("price", "brands", "gender",
|
232
245
|
# "rating") depends on how API orders "gender" and "rating" facets.
|
233
|
-
# However, notice that "price" and "brands"
|
234
|
-
# ranked at
|
235
|
-
# false.
|
246
|
+
# However, notice that "price" and "brands" are always
|
247
|
+
# ranked at first and second position because their enable_dynamic_position
|
248
|
+
# is false.
|
236
249
|
class FacetSpec
|
237
250
|
include ::Google::Protobuf::MessageExts
|
238
251
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -245,7 +258,7 @@ module Google
|
|
245
258
|
# which the facet values are computed. Facet key is case-sensitive.
|
246
259
|
# @!attribute [rw] intervals
|
247
260
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::Interval>]
|
248
|
-
# Set only if values should be
|
261
|
+
# Set only if values should be bucketed into intervals. Must be set
|
249
262
|
# for facets with numerical values. Must not be set for facet with text
|
250
263
|
# values. Maximum number of intervals is 30.
|
251
264
|
# @!attribute [rw] restricted_values
|
@@ -253,22 +266,22 @@ module Google
|
|
253
266
|
# Only get facet for the given restricted values. Only supported on
|
254
267
|
# textual fields. For example, suppose "category" has three values
|
255
268
|
# "Action > 2022", "Action > 2021" and "Sci-Fi > 2022". If set
|
256
|
-
# "restricted_values" to "Action > 2022", the "category" facet
|
257
|
-
#
|
269
|
+
# "restricted_values" to "Action > 2022", the "category" facet only
|
270
|
+
# contains "Action > 2022". Only supported on textual fields. Maximum
|
258
271
|
# is 10.
|
259
272
|
# @!attribute [rw] prefixes
|
260
273
|
# @return [::Array<::String>]
|
261
274
|
# Only get facet values that start with the given string prefix. For
|
262
275
|
# example, suppose "category" has three values "Action > 2022",
|
263
276
|
# "Action > 2021" and "Sci-Fi > 2022". If set "prefixes" to "Action", the
|
264
|
-
# "category" facet
|
277
|
+
# "category" facet only contains "Action > 2022" and "Action > 2021".
|
265
278
|
# Only supported on textual fields. Maximum is 10.
|
266
279
|
# @!attribute [rw] contains
|
267
280
|
# @return [::Array<::String>]
|
268
281
|
# Only get facet values that contains the given strings. For example,
|
269
282
|
# suppose "category" has three values "Action > 2022",
|
270
283
|
# "Action > 2021" and "Sci-Fi > 2022". If set "contains" to "2022", the
|
271
|
-
# "category" facet
|
284
|
+
# "category" facet only contains "Action > 2022" and "Sci-Fi > 2022".
|
272
285
|
# Only supported on textual fields. Maximum is 10.
|
273
286
|
# @!attribute [rw] case_insensitive
|
274
287
|
# @return [::Boolean]
|
@@ -405,49 +418,144 @@ module Google
|
|
405
418
|
end
|
406
419
|
end
|
407
420
|
|
408
|
-
#
|
409
|
-
# search.
|
421
|
+
# A specification for configuring the behavior of content search.
|
410
422
|
# @!attribute [rw] snippet_spec
|
411
423
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SnippetSpec]
|
412
|
-
# If
|
413
|
-
# search
|
424
|
+
# If `snippetSpec` is not specified, snippets are not included in the
|
425
|
+
# search response.
|
414
426
|
# @!attribute [rw] summary_spec
|
415
427
|
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec]
|
416
|
-
# If
|
428
|
+
# If `summarySpec` is not specified, summaries are not included in the
|
417
429
|
# search response.
|
430
|
+
# @!attribute [rw] extractive_content_spec
|
431
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::ExtractiveContentSpec]
|
432
|
+
# If there is no extractive_content_spec provided, there will be no
|
433
|
+
# extractive answer in the search response.
|
418
434
|
class ContentSearchSpec
|
419
435
|
include ::Google::Protobuf::MessageExts
|
420
436
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
421
437
|
|
422
|
-
#
|
438
|
+
# A specification for configuring snippets in a search response.
|
423
439
|
# @!attribute [rw] max_snippet_count
|
424
440
|
# @return [::Integer]
|
425
|
-
#
|
426
|
-
#
|
427
|
-
#
|
428
|
-
#
|
429
|
-
# At most 5 snippets will be returned for each SearchResult.
|
441
|
+
# [DEPRECATED] This field is deprecated. To control snippet return, use
|
442
|
+
# `return_snippet` field. For backwards compatibility, we will return
|
443
|
+
# snippet if max_snippet_count > 0.
|
430
444
|
# @!attribute [rw] reference_only
|
431
445
|
# @return [::Boolean]
|
432
|
-
#
|
446
|
+
# [DEPRECATED] This field is deprecated and will have no affect on the
|
447
|
+
# snippet.
|
448
|
+
# @!attribute [rw] return_snippet
|
449
|
+
# @return [::Boolean]
|
450
|
+
# If `true`, then return snippet. If no snippet can be generated, we
|
451
|
+
# return "No snippet is available for this page." A `snippet_status` with
|
452
|
+
# `SUCCESS` or `NO_SNIPPET_AVAILABLE` will also be returned.
|
433
453
|
class SnippetSpec
|
434
454
|
include ::Google::Protobuf::MessageExts
|
435
455
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
436
456
|
end
|
437
457
|
|
438
|
-
#
|
458
|
+
# A specification for configuring a summary returned in a search
|
459
|
+
# response.
|
439
460
|
# @!attribute [rw] summary_result_count
|
440
461
|
# @return [::Integer]
|
441
|
-
# The number of top results the summary
|
442
|
-
#
|
443
|
-
#
|
444
|
-
# summary would be derived from the top results.
|
462
|
+
# The number of top results to generate the summary from. If the number
|
463
|
+
# of results returned is less than `summaryResultCount`, the summary is
|
464
|
+
# generated from all of the results.
|
445
465
|
#
|
446
|
-
# At most
|
466
|
+
# At most five results can be used to generate a summary.
|
467
|
+
# @!attribute [rw] include_citations
|
468
|
+
# @return [::Boolean]
|
469
|
+
# Specifies whether to include citations in the summary. The default
|
470
|
+
# value is `false`.
|
471
|
+
#
|
472
|
+
# When this field is set to `true`, summaries include in-line citation
|
473
|
+
# numbers.
|
474
|
+
#
|
475
|
+
# Example summary including citations:
|
476
|
+
#
|
477
|
+
# BigQuery is Google Cloud's fully managed and completely serverless
|
478
|
+
# enterprise data warehouse [1]. BigQuery supports all data types, works
|
479
|
+
# across clouds, and has built-in machine learning and business
|
480
|
+
# intelligence, all within a unified platform [2, 3].
|
481
|
+
#
|
482
|
+
# The citation numbers refer to the returned search results and are
|
483
|
+
# 1-indexed. For example, [1] means that the sentence is attributed to
|
484
|
+
# the first search result. [2, 3] means that the sentence is attributed
|
485
|
+
# to both the second and third search results.
|
486
|
+
# @!attribute [rw] ignore_adversarial_query
|
487
|
+
# @return [::Boolean]
|
488
|
+
# Specifies whether to filter out adversarial queries. The default value
|
489
|
+
# is `false`.
|
490
|
+
#
|
491
|
+
# Google employs search-query classification to detect adversarial
|
492
|
+
# queries. No summary is returned if the search query is classified as an
|
493
|
+
# adversarial query. For example, a user might ask a question regarding
|
494
|
+
# negative comments about the company or submit a query designed to
|
495
|
+
# generate unsafe, policy-violating output. If this field is set to
|
496
|
+
# `true`, we skip generating summaries for adversarial queries and return
|
497
|
+
# fallback messages instead.
|
498
|
+
# @!attribute [rw] ignore_non_summary_seeking_query
|
499
|
+
# @return [::Boolean]
|
500
|
+
# Specifies whether to filter out queries that are not summary-seeking.
|
501
|
+
# The default value is `false`.
|
502
|
+
#
|
503
|
+
# Google employs search-query classification to detect summary-seeking
|
504
|
+
# queries. No summary is returned if the search query is classified as a
|
505
|
+
# non-summary seeking query. For example, `why is the sky blue` and `Who
|
506
|
+
# is the best soccer player in the world?` are summary-seeking queries,
|
507
|
+
# but `SFO airport` and `world cup 2026` are not. They are most likely
|
508
|
+
# navigational queries. If this field is set to `true`, we skip
|
509
|
+
# generating summaries for non-summary seeking queries and return
|
510
|
+
# fallback messages instead.
|
447
511
|
class SummarySpec
|
448
512
|
include ::Google::Protobuf::MessageExts
|
449
513
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
450
514
|
end
|
515
|
+
|
516
|
+
# A specification for configuring the extractive content in a search
|
517
|
+
# response.
|
518
|
+
# @!attribute [rw] max_extractive_answer_count
|
519
|
+
# @return [::Integer]
|
520
|
+
# The maximum number of extractive answers returned in each search
|
521
|
+
# result.
|
522
|
+
#
|
523
|
+
# An extractive answer is a verbatim answer extracted from the original
|
524
|
+
# document, which provides a precise and contextually relevant answer to
|
525
|
+
# the search query.
|
526
|
+
#
|
527
|
+
# If the number of matching answers is less than the
|
528
|
+
# `max_extractive_answer_count`, return all of the answers. Otherwise,
|
529
|
+
# return the `max_extractive_answer_count`.
|
530
|
+
#
|
531
|
+
# At most one answer is returned for each
|
532
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult SearchResult}.
|
533
|
+
# @!attribute [rw] max_extractive_segment_count
|
534
|
+
# @return [::Integer]
|
535
|
+
# The max number of extractive segments returned in each search result.
|
536
|
+
# Only applied if the
|
537
|
+
# [DataStore][google.cloud.discoveryengine.v1beta.DataStore] is set to
|
538
|
+
# [DataStore.ContentConfig.CONTENT_REQUIRED][google.cloud.discoveryengine.v1beta.DataStore.ContentConfig.CONTENT_REQUIRED]
|
539
|
+
# or
|
540
|
+
# [DataStore.solution_types][google.cloud.discoveryengine.v1beta.DataStore.solution_types]
|
541
|
+
# is
|
542
|
+
# [SOLUTION_TYPE_CHAT][google.cloud.discoveryengine.v1beta.SolutionType.SOLUTION_TYPE_CHAT].
|
543
|
+
#
|
544
|
+
# An extractive segment is a text segment extracted from the original
|
545
|
+
# document that is relevant to the search query, and, in general, more
|
546
|
+
# verbose than an extractive answer. The segment could then be used as
|
547
|
+
# input for LLMs to generate summaries and answers.
|
548
|
+
#
|
549
|
+
# If the number of matching segments is less than
|
550
|
+
# `max_extractive_segment_count`, return all of the segments. Otherwise,
|
551
|
+
# return the `max_extractive_segment_count`.
|
552
|
+
#
|
553
|
+
# Currently one segment is returned for each
|
554
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::SearchResult SearchResult}.
|
555
|
+
class ExtractiveContentSpec
|
556
|
+
include ::Google::Protobuf::MessageExts
|
557
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
558
|
+
end
|
451
559
|
end
|
452
560
|
|
453
561
|
# @!attribute [rw] key
|
@@ -495,6 +603,14 @@ module Google
|
|
495
603
|
# {::Google::Cloud::DiscoveryEngine::V1beta::UserEvent UserEvent} logs resulting
|
496
604
|
# from this search, which enables accurate attribution of search model
|
497
605
|
# performance.
|
606
|
+
# @!attribute [rw] redirect_uri
|
607
|
+
# @return [::String]
|
608
|
+
# The URI of a customer-defined redirect page. If redirect action is
|
609
|
+
# triggered, no search is performed, and only
|
610
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse#redirect_uri redirect_uri}
|
611
|
+
# and
|
612
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse#attribution_token attribution_token}
|
613
|
+
# are set in the response.
|
498
614
|
# @!attribute [rw] next_page_token
|
499
615
|
# @return [::String]
|
500
616
|
# A token that can be sent as
|
@@ -571,6 +687,9 @@ module Google
|
|
571
687
|
# @!attribute [rw] refinement_attributes
|
572
688
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::GuidedSearchResult::RefinementAttribute>]
|
573
689
|
# A list of ranked refinement attributes.
|
690
|
+
# @!attribute [rw] follow_up_questions
|
691
|
+
# @return [::Array<::String>]
|
692
|
+
# Suggested follow-up questions.
|
574
693
|
class GuidedSearchResult
|
575
694
|
include ::Google::Protobuf::MessageExts
|
576
695
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -592,9 +711,40 @@ module Google
|
|
592
711
|
# @!attribute [rw] summary_text
|
593
712
|
# @return [::String]
|
594
713
|
# The summary content.
|
714
|
+
# @!attribute [rw] summary_skipped_reasons
|
715
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1beta::SearchResponse::Summary::SummarySkippedReason>]
|
716
|
+
# Additional summary-skipped reasons. This provides the reason for ignored
|
717
|
+
# cases. If nothing is skipped, this field is not set.
|
595
718
|
class Summary
|
596
719
|
include ::Google::Protobuf::MessageExts
|
597
720
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
721
|
+
|
722
|
+
# An Enum for summary-skipped reasons.
|
723
|
+
module SummarySkippedReason
|
724
|
+
# Default value. The summary skipped reason is not specified.
|
725
|
+
SUMMARY_SKIPPED_REASON_UNSPECIFIED = 0
|
726
|
+
|
727
|
+
# The adversarial query ignored case.
|
728
|
+
#
|
729
|
+
# Only populated when
|
730
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
|
731
|
+
# is set to `true`.
|
732
|
+
ADVERSARIAL_QUERY_IGNORED = 1
|
733
|
+
|
734
|
+
# The non-summary seeking query ignored case.
|
735
|
+
#
|
736
|
+
# Only populated when
|
737
|
+
# {::Google::Cloud::DiscoveryEngine::V1beta::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
|
738
|
+
# is set to `true`.
|
739
|
+
NON_SUMMARY_SEEKING_QUERY_IGNORED = 2
|
740
|
+
|
741
|
+
# The out-of-domain query ignored case.
|
742
|
+
#
|
743
|
+
# Google skips the summary if there are no high-relevance search results.
|
744
|
+
# For example, the data store contains facts about company A but the
|
745
|
+
# user query is asking questions about company B.
|
746
|
+
OUT_OF_DOMAIN_QUERY_IGNORED = 3
|
747
|
+
end
|
598
748
|
end
|
599
749
|
end
|
600
750
|
end
|