google-cloud-discovery_engine-v1 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +14 -0
  3. data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +10 -1
  4. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +10 -1
  5. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +14 -0
  6. data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +109 -1
  7. data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +102 -1
  8. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +14 -0
  9. data/lib/google/cloud/discovery_engine/v1/document_service/rest/service_stub.rb +66 -0
  10. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +14 -0
  11. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +14 -0
  12. data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +2 -1
  13. data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +2 -1
  14. data/lib/google/cloud/discovery_engine/v1/rest.rb +1 -0
  15. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +14 -0
  16. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +6 -3
  17. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +6 -3
  18. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/client.rb +571 -0
  19. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/credentials.rb +47 -0
  20. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/operations.rb +809 -0
  21. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/paths.rb +78 -0
  22. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/client.rb +531 -0
  23. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb +1128 -0
  24. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/service_stub.rb +188 -0
  25. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest.rb +53 -0
  26. data/lib/google/cloud/discovery_engine/v1/search_tuning_service.rb +56 -0
  27. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +14 -0
  28. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +139 -0
  29. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +132 -0
  30. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +14 -0
  31. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +68 -0
  32. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  33. data/lib/google/cloud/discovery_engine/v1.rb +1 -0
  34. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +2 -1
  35. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +1 -1
  36. data/lib/google/cloud/discoveryengine/v1/custom_tuning_model_pb.rb +48 -0
  37. data/lib/google/cloud/discoveryengine/v1/data_store_service_pb.rb +1 -1
  38. data/lib/google/cloud/discoveryengine/v1/document_pb.rb +4 -1
  39. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +10 -1
  40. data/lib/google/cloud/discoveryengine/v1/document_service_services_pb.rb +4 -0
  41. data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +1 -1
  42. data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +8 -1
  43. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +1 -1
  44. data/lib/google/cloud/discoveryengine/v1/search_tuning_service_pb.rb +61 -0
  45. data/lib/google/cloud/discoveryengine/v1/search_tuning_service_services_pb.rb +47 -0
  46. data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
  47. data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +2 -1
  48. data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +5 -0
  49. data/proto_docs/google/api/client.rb +17 -0
  50. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +50 -5
  51. data/proto_docs/google/cloud/discoveryengine/v1/control.rb +6 -4
  52. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +9 -9
  53. data/proto_docs/google/cloud/discoveryengine/v1/custom_tuning_model.rb +94 -0
  54. data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +10 -0
  55. data/proto_docs/google/cloud/discoveryengine/v1/document.rb +22 -0
  56. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +2 -0
  57. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +101 -0
  58. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +2 -1
  59. data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +13 -7
  60. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +115 -0
  61. data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +2 -1
  62. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +40 -16
  63. data/proto_docs/google/cloud/discoveryengine/v1/search_tuning_service.rb +172 -0
  64. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +4 -0
  65. metadata +16 -2
@@ -179,6 +179,107 @@ module Google
179
179
  include ::Google::Protobuf::MessageExts
180
180
  extend ::Google::Protobuf::MessageExts::ClassMethods
181
181
  end
182
+
183
+ # Request message for
184
+ # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#batch_get_documents_metadata DocumentService.BatchGetDocumentsMetadata}
185
+ # method.
186
+ # @!attribute [rw] parent
187
+ # @return [::String]
188
+ # Required. The parent branch resource name, such as
189
+ # `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}`.
190
+ # @!attribute [rw] matcher
191
+ # @return [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest::Matcher]
192
+ # Required. Matcher for the
193
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}s.
194
+ class BatchGetDocumentsMetadataRequest
195
+ include ::Google::Protobuf::MessageExts
196
+ extend ::Google::Protobuf::MessageExts::ClassMethods
197
+
198
+ # Matcher for the {::Google::Cloud::DiscoveryEngine::V1::Document Document}s by
199
+ # exact uris.
200
+ # @!attribute [rw] uris
201
+ # @return [::Array<::String>]
202
+ # The exact URIs to match by.
203
+ class UrisMatcher
204
+ include ::Google::Protobuf::MessageExts
205
+ extend ::Google::Protobuf::MessageExts::ClassMethods
206
+ end
207
+
208
+ # Matcher for the {::Google::Cloud::DiscoveryEngine::V1::Document Document}s.
209
+ # Currently supports matching by exact URIs.
210
+ # @!attribute [rw] uris_matcher
211
+ # @return [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest::UrisMatcher]
212
+ # Matcher by exact URIs.
213
+ class Matcher
214
+ include ::Google::Protobuf::MessageExts
215
+ extend ::Google::Protobuf::MessageExts::ClassMethods
216
+ end
217
+ end
218
+
219
+ # Response message for
220
+ # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#batch_get_documents_metadata DocumentService.BatchGetDocumentsMetadata}
221
+ # method.
222
+ # @!attribute [rw] documents_metadata
223
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse::DocumentMetadata>]
224
+ # The metadata of the {::Google::Cloud::DiscoveryEngine::V1::Document Document}s.
225
+ class BatchGetDocumentsMetadataResponse
226
+ include ::Google::Protobuf::MessageExts
227
+ extend ::Google::Protobuf::MessageExts::ClassMethods
228
+
229
+ # The metadata of a {::Google::Cloud::DiscoveryEngine::V1::Document Document}.
230
+ # @!attribute [rw] matcher_value
231
+ # @return [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse::DocumentMetadata::MatcherValue]
232
+ # The value of the matcher that was used to match the
233
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}.
234
+ # @!attribute [rw] state
235
+ # @return [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataResponse::State]
236
+ # The state of the document.
237
+ # @!attribute [rw] last_refreshed_time
238
+ # @return [::Google::Protobuf::Timestamp]
239
+ # The timestamp of the last time the
240
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document} was last indexed.
241
+ # @!attribute [rw] data_ingestion_source
242
+ # @return [::String]
243
+ # The data ingestion source of the
244
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}.
245
+ #
246
+ # Allowed values are:
247
+ #
248
+ # * `batch`: Data ingested via Batch API, e.g., ImportDocuments.
249
+ # * `streaming` Data ingested via Streaming API, e.g., FHIR streaming.
250
+ class DocumentMetadata
251
+ include ::Google::Protobuf::MessageExts
252
+ extend ::Google::Protobuf::MessageExts::ClassMethods
253
+
254
+ # The value of the matcher that was used to match the
255
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}.
256
+ # @!attribute [rw] uri
257
+ # @return [::String]
258
+ # If match by URI, the URI of the
259
+ # {::Google::Cloud::DiscoveryEngine::V1::Document Document}.
260
+ class MatcherValue
261
+ include ::Google::Protobuf::MessageExts
262
+ extend ::Google::Protobuf::MessageExts::ClassMethods
263
+ end
264
+ end
265
+
266
+ # The state of the {::Google::Cloud::DiscoveryEngine::V1::Document Document}.
267
+ module State
268
+ # Should never be set.
269
+ STATE_UNSPECIFIED = 0
270
+
271
+ # The {::Google::Cloud::DiscoveryEngine::V1::Document Document} is indexed.
272
+ INDEXED = 1
273
+
274
+ # The {::Google::Cloud::DiscoveryEngine::V1::Document Document} is not indexed
275
+ # because its URI is not in the
276
+ # {::Google::Cloud::DiscoveryEngine::V1::TargetSite TargetSite}.
277
+ NOT_IN_TARGET_SITE = 2
278
+
279
+ # The {::Google::Cloud::DiscoveryEngine::V1::Document Document} is not indexed.
280
+ NOT_IN_INDEX = 3
281
+ end
282
+ end
182
283
  end
183
284
  end
184
285
  end
@@ -130,8 +130,9 @@ module Google
130
130
  # field will be set to false. In that case, no grounding check was done for
131
131
  # the claim and therefore
132
132
  # {::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim#citation_indices citation_indices},
133
+ # [anti_citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.anti_citation_indices],
133
134
  # and
134
- # [anti_citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.anti_citation_indices]
135
+ # [score][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.score]
135
136
  # should not be returned.
136
137
  class Claim
137
138
  include ::Google::Protobuf::MessageExts
@@ -68,7 +68,7 @@ module Google
68
68
  # BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
69
69
  # @!attribute [rw] project_id
70
70
  # @return [::String]
71
- # The project ID (can be project # or ID) that the BigQuery source is in with
71
+ # The project ID or the project number that contains the BigQuery source. Has
72
72
  # a length limit of 128 characters. If not specified, inherits the project
73
73
  # ID from the parent request.
74
74
  # @!attribute [rw] dataset_id
@@ -113,7 +113,7 @@ module Google
113
113
  # The Spanner source for importing data
114
114
  # @!attribute [rw] project_id
115
115
  # @return [::String]
116
- # The project ID that the Spanner source is in with a length limit of 128
116
+ # The project ID that contains the Spanner source. Has a length limit of 128
117
117
  # characters. If not specified, inherits the project ID from the parent
118
118
  # request.
119
119
  # @!attribute [rw] instance_id
@@ -268,7 +268,7 @@ module Google
268
268
  # The Cloud Bigtable source for importing data.
269
269
  # @!attribute [rw] project_id
270
270
  # @return [::String]
271
- # The project ID that the Bigtable source is in with a length limit of 128
271
+ # The project ID that contains the Bigtable source. Has a length limit of 128
272
272
  # characters. If not specified, inherits the project ID from the parent
273
273
  # request.
274
274
  # @!attribute [rw] instance_id
@@ -297,6 +297,12 @@ module Google
297
297
  # Intermediate Cloud Storage directory used for the import with a length
298
298
  # limit of 2,000 characters. Can be specified if one wants to have the
299
299
  # FhirStore export to a specific Cloud Storage directory.
300
+ # @!attribute [rw] resource_types
301
+ # @return [::Array<::String>]
302
+ # The FHIR resource types to import. The resource types should be a subset of
303
+ # all [supported FHIR resource
304
+ # types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification).
305
+ # Default to all supported FHIR resource types if empty.
300
306
  class FhirStoreSource
301
307
  include ::Google::Protobuf::MessageExts
302
308
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -305,8 +311,8 @@ module Google
305
311
  # Cloud SQL source import data from.
306
312
  # @!attribute [rw] project_id
307
313
  # @return [::String]
308
- # The project ID that the Cloud SQL source is in with a length limit of 128
309
- # characters. If not specified, inherits the project ID from the parent
314
+ # The project ID that contains the Cloud SQL source. Has a length limit of
315
+ # 128 characters. If not specified, inherits the project ID from the parent
310
316
  # request.
311
317
  # @!attribute [rw] instance_id
312
318
  # @return [::String]
@@ -341,8 +347,8 @@ module Google
341
347
  # AlloyDB source import data from.
342
348
  # @!attribute [rw] project_id
343
349
  # @return [::String]
344
- # The project ID that the AlloyDB source is in
345
- # with a length limit of 128 characters. If not specified, inherits the
350
+ # The project ID that contains the AlloyDB source.
351
+ # Has a length limit of 128 characters. If not specified, inherits the
346
352
  # project ID from the parent request.
347
353
  # @!attribute [rw] location_id
348
354
  # @return [::String]
@@ -21,9 +21,107 @@ module Google
21
21
  module Cloud
22
22
  module DiscoveryEngine
23
23
  module V1
24
+ # Request message for PurgeUserEvents method.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. The resource name of the catalog under which the events are
28
+ # created. The format is
29
+ # `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`
30
+ # @!attribute [rw] filter
31
+ # @return [::String]
32
+ # Required. The filter string to specify the events to be deleted with a
33
+ # length limit of 5,000 characters. The eligible fields for filtering are:
34
+ #
35
+ # * `eventType`: Double quoted
36
+ # {::Google::Cloud::DiscoveryEngine::V1::UserEvent#event_type UserEvent.event_type}
37
+ # string.
38
+ # * `eventTime`: in ISO 8601 "zulu" format.
39
+ # * `userPseudoId`: Double quoted string. Specifying this will delete all
40
+ # events associated with a visitor.
41
+ # * `userId`: Double quoted string. Specifying this will delete all events
42
+ # associated with a user.
43
+ #
44
+ # Examples:
45
+ #
46
+ # * Deleting all events in a time range:
47
+ # `eventTime > "2012-04-23T18:25:43.511Z"
48
+ # eventTime < "2012-04-23T18:30:43.511Z"`
49
+ # * Deleting specific eventType:
50
+ # `eventType = "search"`
51
+ # * Deleting all events for a specific visitor:
52
+ # `userPseudoId = "visitor1024"`
53
+ # * Deleting all events inside a DataStore:
54
+ # `*`
55
+ #
56
+ # The filtering fields are assumed to have an implicit AND.
57
+ # @!attribute [rw] force
58
+ # @return [::Boolean]
59
+ # The `force` field is currently not supported. Purge user event requests
60
+ # will permanently delete all purgeable events. Once the development is
61
+ # complete:
62
+ # If `force` is set to false, the method will return the expected
63
+ # purge count without deleting any user events. This field will default to
64
+ # false if not included in the request.
65
+ class PurgeUserEventsRequest
66
+ include ::Google::Protobuf::MessageExts
67
+ extend ::Google::Protobuf::MessageExts::ClassMethods
68
+ end
69
+
70
+ # Response of the PurgeUserEventsRequest. If the long running operation is
71
+ # successfully done, then this message is returned by the
72
+ # google.longrunning.Operations.response field.
73
+ # @!attribute [rw] purge_count
74
+ # @return [::Integer]
75
+ # The total count of events purged as a result of the operation.
76
+ class PurgeUserEventsResponse
77
+ include ::Google::Protobuf::MessageExts
78
+ extend ::Google::Protobuf::MessageExts::ClassMethods
79
+ end
80
+
81
+ # Metadata related to the progress of the PurgeUserEvents operation.
82
+ # This will be returned by the google.longrunning.Operation.metadata field.
83
+ # @!attribute [rw] create_time
84
+ # @return [::Google::Protobuf::Timestamp]
85
+ # Operation create time.
86
+ # @!attribute [rw] update_time
87
+ # @return [::Google::Protobuf::Timestamp]
88
+ # Operation last update time. If the operation is done, this is also the
89
+ # finish time.
90
+ # @!attribute [rw] success_count
91
+ # @return [::Integer]
92
+ # Count of entries that were deleted successfully.
93
+ # @!attribute [rw] failure_count
94
+ # @return [::Integer]
95
+ # Count of entries that encountered errors while processing.
96
+ class PurgeUserEventsMetadata
97
+ include ::Google::Protobuf::MessageExts
98
+ extend ::Google::Protobuf::MessageExts::ClassMethods
99
+ end
100
+
101
+ # Configuration of destination for Purge related errors.
102
+ # @!attribute [rw] gcs_prefix
103
+ # @return [::String]
104
+ # Cloud Storage prefix for purge errors. This must be an empty,
105
+ # existing Cloud Storage directory. Purge errors are written to
106
+ # sharded files in this directory, one per line, as a JSON-encoded
107
+ # `google.rpc.Status` message.
108
+ class PurgeErrorConfig
109
+ include ::Google::Protobuf::MessageExts
110
+ extend ::Google::Protobuf::MessageExts::ClassMethods
111
+ end
112
+
24
113
  # Request message for
25
114
  # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#purge_documents DocumentService.PurgeDocuments}
26
115
  # method.
116
+ # @!attribute [rw] gcs_source
117
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GcsSource]
118
+ # Cloud Storage location for the input content.
119
+ # Supported `data_schema`:
120
+ # * `document_id`: One valid
121
+ # {::Google::Cloud::DiscoveryEngine::V1::Document#id Document.id} per line.
122
+ # @!attribute [rw] inline_source
123
+ # @return [::Google::Cloud::DiscoveryEngine::V1::PurgeDocumentsRequest::InlineSource]
124
+ # Inline source for the input content for purge.
27
125
  # @!attribute [rw] parent
28
126
  # @return [::String]
29
127
  # Required. The parent resource name, such as
@@ -33,6 +131,9 @@ module Google
33
131
  # Required. Filter matching documents to purge. Only currently supported
34
132
  # value is
35
133
  # `*` (all items).
134
+ # @!attribute [rw] error_config
135
+ # @return [::Google::Cloud::DiscoveryEngine::V1::PurgeErrorConfig]
136
+ # The desired location of errors incurred during the purge.
36
137
  # @!attribute [rw] force
37
138
  # @return [::Boolean]
38
139
  # Actually performs the purge. If `force` is set to false, return the
@@ -40,6 +141,20 @@ module Google
40
141
  class PurgeDocumentsRequest
41
142
  include ::Google::Protobuf::MessageExts
42
143
  extend ::Google::Protobuf::MessageExts::ClassMethods
144
+
145
+ # The inline source for the input config for
146
+ # {::Google::Cloud::DiscoveryEngine::V1::DocumentService::Client#purge_documents DocumentService.PurgeDocuments}
147
+ # method.
148
+ # @!attribute [rw] documents
149
+ # @return [::Array<::String>]
150
+ # Required. A list of full resource name of documents to purge. In the
151
+ # format
152
+ # `projects/*/locations/*/collections/*/dataStores/*/branches/*/documents/*`.
153
+ # Recommended max of 100 items.
154
+ class InlineSource
155
+ include ::Google::Protobuf::MessageExts
156
+ extend ::Google::Protobuf::MessageExts::ClassMethods
157
+ end
43
158
  end
44
159
 
45
160
  # Response message for
@@ -24,7 +24,8 @@ module Google
24
24
  # Request message for Recommend method.
25
25
  # @!attribute [rw] serving_config
26
26
  # @return [::String]
27
- # Required. Full resource name of a [ServingConfig][]:
27
+ # Required. Full resource name of a
28
+ # [ServingConfig][google.cloud.discoveryengine.v1.ServingConfig]:
28
29
  # `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or
29
30
  # `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
30
31
  #
@@ -120,9 +120,12 @@ module Google
120
120
  # Leave it unset if ordered by relevance. `order_by` expression is
121
121
  # case-sensitive.
122
122
  #
123
- # For more information on ordering for retail search, see
124
- # [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
125
- #
123
+ # For more information on ordering the website search results, see
124
+ # [Order web search
125
+ # results](https://cloud.google.com/generative-ai-app-builder/docs/order-web-search-results).
126
+ # For more information on ordering the healthcare search results, see
127
+ # [Order healthcare search
128
+ # results](https://cloud.google.com/generative-ai-app-builder/docs/order-hc-results).
126
129
  # If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
127
130
  # @!attribute [rw] user_info
128
131
  # @return [::Google::Cloud::DiscoveryEngine::V1::UserInfo]
@@ -548,11 +551,7 @@ module Google
548
551
  # @!attribute [rw] search_result_mode
549
552
  # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode]
550
553
  # Specifies the search result mode. If unspecified, the
551
- # search result mode is based on
552
- # [DataStore.DocumentProcessingConfig.chunking_config][]:
553
- # * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
554
- # it defaults to `CHUNKS`.
555
- # * Otherwise, it defaults to `DOCUMENTS`.
554
+ # search result mode defaults to `DOCUMENTS`.
556
555
  # @!attribute [rw] chunk_spec
557
556
  # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::ChunkSpec]
558
557
  # Specifies the chunk spec to be returned from the search response.
@@ -643,6 +642,14 @@ module Google
643
642
  # navigational queries. If this field is set to `true`, we skip
644
643
  # generating summaries for non-summary seeking queries and return
645
644
  # fallback messages instead.
645
+ # @!attribute [rw] ignore_low_relevant_content
646
+ # @return [::Boolean]
647
+ # Specifies whether to filter out queries that have low relevance. The
648
+ # default value is `false`.
649
+ #
650
+ # If this field is set to `false`, all search results are used regardless
651
+ # of relevance to generate answers. If set to `true`, only queries with
652
+ # high relevance search results will generate answers.
646
653
  # @!attribute [rw] model_prompt_spec
647
654
  # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec::ModelPromptSpec]
648
655
  # If specified, the spec will be used to modify the prompt provided to
@@ -777,11 +784,7 @@ module Google
777
784
  end
778
785
 
779
786
  # Specifies the search result mode. If unspecified, the
780
- # search result mode is based on
781
- # [DataStore.DocumentProcessingConfig.chunking_config][]:
782
- # * If [DataStore.DocumentProcessingConfig.chunking_config][] is specified,
783
- # it defaults to `CHUNKS`.
784
- # * Otherwise, it defaults to `DOCUMENTS`.
787
+ # search result mode defaults to `DOCUMENTS`.
785
788
  module SearchResultMode
786
789
  # Default value.
787
790
  SEARCH_RESULT_MODE_UNSPECIFIED = 0
@@ -905,7 +908,8 @@ module Google
905
908
  # A unique search token. This should be included in the
906
909
  # {::Google::Cloud::DiscoveryEngine::V1::UserEvent UserEvent} logs resulting from
907
910
  # this search, which enables accurate attribution of search model
908
- # performance.
911
+ # performance. This also helps to identify a request during the customer
912
+ # support scenarios.
909
913
  # @!attribute [rw] redirect_uri
910
914
  # @return [::String]
911
915
  # The URI of a customer-defined redirect page. If redirect action is
@@ -1121,14 +1125,14 @@ module Google
1121
1125
 
1122
1126
  # The adversarial query ignored case.
1123
1127
  #
1124
- # Only populated when
1128
+ # Only used when
1125
1129
  # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_adversarial_query SummarySpec.ignore_adversarial_query}
1126
1130
  # is set to `true`.
1127
1131
  ADVERSARIAL_QUERY_IGNORED = 1
1128
1132
 
1129
1133
  # The non-summary seeking query ignored case.
1130
1134
  #
1131
- # Only populated when
1135
+ # Only used when
1132
1136
  # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
1133
1137
  # is set to `true`.
1134
1138
  NON_SUMMARY_SEEKING_QUERY_IGNORED = 2
@@ -1150,6 +1154,26 @@ module Google
1150
1154
  #
1151
1155
  # Google skips the summary if the LLM addon is not enabled.
1152
1156
  LLM_ADDON_NOT_ENABLED = 5
1157
+
1158
+ # The no relevant content case.
1159
+ #
1160
+ # Google skips the summary if there is no relevant content in the
1161
+ # retrieved search results.
1162
+ NO_RELEVANT_CONTENT = 6
1163
+
1164
+ # The jail-breaking query ignored case.
1165
+ #
1166
+ # For example, "Reply in the tone of a competing company's CEO".
1167
+ # Only used when
1168
+ # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_jail_breaking_query]
1169
+ # is set to `true`.
1170
+ JAIL_BREAKING_QUERY_IGNORED = 7
1171
+
1172
+ # The customer policy violation case.
1173
+ #
1174
+ # Google skips the summary if there is a customer policy violation
1175
+ # detected. The policy is defined by the customer.
1176
+ CUSTOMER_POLICY_VIOLATION = 8
1153
1177
  end
1154
1178
  end
1155
1179
 
@@ -0,0 +1,172 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2024 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module DiscoveryEngine
23
+ module V1
24
+ # Request message for
25
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchTuningService::Client#list_custom_models SearchTuningService.ListCustomModels}
26
+ # method.
27
+ # @!attribute [rw] data_store
28
+ # @return [::String]
29
+ # Required. The resource name of the parent Data Store, such as
30
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
31
+ # This field is used to identify the data store where to fetch the models
32
+ # from.
33
+ class ListCustomModelsRequest
34
+ include ::Google::Protobuf::MessageExts
35
+ extend ::Google::Protobuf::MessageExts::ClassMethods
36
+ end
37
+
38
+ # Response message for
39
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchTuningService::Client#list_custom_models SearchTuningService.ListCustomModels}
40
+ # method.
41
+ # @!attribute [rw] models
42
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CustomTuningModel>]
43
+ # List of custom tuning models.
44
+ class ListCustomModelsResponse
45
+ include ::Google::Protobuf::MessageExts
46
+ extend ::Google::Protobuf::MessageExts::ClassMethods
47
+ end
48
+
49
+ # Request message for
50
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchTuningService::Client#train_custom_model SearchTuningService.TrainCustomModel}
51
+ # method.
52
+ # @!attribute [rw] gcs_training_input
53
+ # @return [::Google::Cloud::DiscoveryEngine::V1::TrainCustomModelRequest::GcsTrainingInput]
54
+ # Cloud Storage training input.
55
+ # @!attribute [rw] data_store
56
+ # @return [::String]
57
+ # Required. The resource name of the Data Store, such as
58
+ # `projects/*/locations/global/collections/default_collection/dataStores/default_data_store`.
59
+ # This field is used to identify the data store where to train the models.
60
+ # @!attribute [rw] model_type
61
+ # @return [::String]
62
+ # Model to be trained. Supported values are:
63
+ #
64
+ # * **search-tuning**: Fine tuning the search system based on data provided.
65
+ # @!attribute [rw] error_config
66
+ # @return [::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig]
67
+ # The desired location of errors incurred during the data ingestion and
68
+ # training.
69
+ # @!attribute [rw] model_id
70
+ # @return [::String]
71
+ # If not provided, a UUID will be generated.
72
+ class TrainCustomModelRequest
73
+ include ::Google::Protobuf::MessageExts
74
+ extend ::Google::Protobuf::MessageExts::ClassMethods
75
+
76
+ # Cloud Storage training data input.
77
+ # @!attribute [rw] corpus_data_path
78
+ # @return [::String]
79
+ # The Cloud Storage corpus data which could be associated in train data.
80
+ # The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
81
+ # A newline delimited jsonl/ndjson file.
82
+ #
83
+ # For search-tuning model, each line should have the _id, title
84
+ # and text. Example:
85
+ # `{"_id": "doc1", title: "relevant doc", "text": "relevant text"}`
86
+ # @!attribute [rw] query_data_path
87
+ # @return [::String]
88
+ # The gcs query data which could be associated in train data.
89
+ # The data path format is `gs://<bucket_to_data>/<jsonl_file_name>`.
90
+ # A newline delimited jsonl/ndjson file.
91
+ #
92
+ # For search-tuning model, each line should have the _id
93
+ # and text. Example: \\{"_id": "query1", "text": "example query"}
94
+ # @!attribute [rw] train_data_path
95
+ # @return [::String]
96
+ # Cloud Storage training data path whose format should be
97
+ # `gs://<bucket_to_data>/<tsv_file_name>`. The file should be in tsv
98
+ # format. Each line should have the doc_id and query_id and score (number).
99
+ #
100
+ # For search-tuning model, it should have the query-id corpus-id
101
+ # score as tsv file header. The score should be a number in `[0, inf+)`.
102
+ # The larger the number is, the more relevant the pair is. Example:
103
+ #
104
+ # * `query-id\tcorpus-id\tscore`
105
+ # * `query1\tdoc1\t1`
106
+ # @!attribute [rw] test_data_path
107
+ # @return [::String]
108
+ # Cloud Storage test data. Same format as train_data_path. If not provided,
109
+ # a random 80/20 train/test split will be performed on train_data_path.
110
+ class GcsTrainingInput
111
+ include ::Google::Protobuf::MessageExts
112
+ extend ::Google::Protobuf::MessageExts::ClassMethods
113
+ end
114
+ end
115
+
116
+ # Response of the
117
+ # {::Google::Cloud::DiscoveryEngine::V1::TrainCustomModelRequest TrainCustomModelRequest}.
118
+ # This message is returned by the google.longrunning.Operations.response field.
119
+ # @!attribute [rw] error_samples
120
+ # @return [::Array<::Google::Rpc::Status>]
121
+ # A sample of errors encountered while processing the data.
122
+ # @!attribute [rw] error_config
123
+ # @return [::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig]
124
+ # Echoes the destination for the complete errors in the request if set.
125
+ # @!attribute [rw] model_status
126
+ # @return [::String]
127
+ # The trained model status. Possible values are:
128
+ #
129
+ # * **bad-data**: The training data quality is bad.
130
+ # * **no-improvement**: Tuning didn't improve performance. Won't deploy.
131
+ # * **in-progress**: Model training job creation is in progress.
132
+ # * **training**: Model is actively training.
133
+ # * **evaluating**: The model is evaluating trained metrics.
134
+ # * **indexing**: The model trained metrics are indexing.
135
+ # * **ready**: The model is ready for serving.
136
+ # @!attribute [rw] metrics
137
+ # @return [::Google::Protobuf::Map{::String => ::Float}]
138
+ # The metrics of the trained model.
139
+ # @!attribute [rw] model_name
140
+ # @return [::String]
141
+ # Fully qualified name of the CustomTuningModel.
142
+ class TrainCustomModelResponse
143
+ include ::Google::Protobuf::MessageExts
144
+ extend ::Google::Protobuf::MessageExts::ClassMethods
145
+
146
+ # @!attribute [rw] key
147
+ # @return [::String]
148
+ # @!attribute [rw] value
149
+ # @return [::Float]
150
+ class MetricsEntry
151
+ include ::Google::Protobuf::MessageExts
152
+ extend ::Google::Protobuf::MessageExts::ClassMethods
153
+ end
154
+ end
155
+
156
+ # Metadata related to the progress of the TrainCustomModel operation. This is
157
+ # returned by the google.longrunning.Operation.metadata field.
158
+ # @!attribute [rw] create_time
159
+ # @return [::Google::Protobuf::Timestamp]
160
+ # Operation create time.
161
+ # @!attribute [rw] update_time
162
+ # @return [::Google::Protobuf::Timestamp]
163
+ # Operation last update time. If the operation is done, this is also the
164
+ # finish time.
165
+ class TrainCustomModelMetadata
166
+ include ::Google::Protobuf::MessageExts
167
+ extend ::Google::Protobuf::MessageExts::ClassMethods
168
+ end
169
+ end
170
+ end
171
+ end
172
+ end
@@ -447,6 +447,10 @@ module Google
447
447
  # @return [::Array<::String>]
448
448
  # The promotion IDs associated with this Document.
449
449
  # Currently, this field is restricted to at most one ID.
450
+ # @!attribute [r] joined
451
+ # @return [::Boolean]
452
+ # Output only. Whether the referenced Document can be found in the data
453
+ # store.
450
454
  class DocumentInfo
451
455
  include ::Google::Protobuf::MessageExts
452
456
  extend ::Google::Protobuf::MessageExts::ClassMethods