google-cloud-discovery_engine-v1 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +2 -2
  3. data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +6 -6
  4. data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +6 -6
  5. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +15 -12
  6. data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +15 -12
  7. data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +2 -2
  8. data/lib/google/cloud/discovery_engine/v1/document_service/paths.rb +25 -0
  9. data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +2 -2
  10. data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +2 -2
  11. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +219 -3
  12. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +85 -0
  13. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +126 -3
  14. data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +60 -0
  15. data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +2 -2
  16. data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +1 -1
  17. data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +1 -1
  18. data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +2 -2
  19. data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +5 -1
  20. data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +5 -1
  21. data/lib/google/cloud/discovery_engine/v1/search_tuning_service/rest/operations.rb +2 -2
  22. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +5 -1
  23. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +5 -1
  24. data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +2 -2
  25. data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +1 -1
  26. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +1 -1
  27. data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +2 -2
  28. data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
  29. data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +1 -1
  30. data/lib/google/cloud/discoveryengine/v1/common_pb.rb +1 -1
  31. data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +2 -1
  32. data/lib/google/cloud/discoveryengine/v1/custom_tuning_model_pb.rb +1 -1
  33. data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +4 -1
  34. data/lib/google/cloud/discoveryengine/v1/document_service_pb.rb +2 -1
  35. data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
  36. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +23 -1
  37. data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +4 -0
  38. data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +5 -1
  39. data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb +1 -1
  40. data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +12 -2
  41. data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +6 -6
  42. data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +59 -15
  43. data/proto_docs/google/cloud/discoveryengine/v1/custom_tuning_model.rb +8 -3
  44. data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +88 -0
  45. data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +7 -5
  46. data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +19 -0
  47. data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +5 -1
  48. data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +383 -0
  49. data/proto_docs/google/cloud/discoveryengine/v1/project.rb +1 -1
  50. data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +1 -1
  51. data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +1 -1
  52. data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +116 -0
  53. data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine_service.rb +5 -0
  54. data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +1 -1
  55. metadata +3 -3
@@ -205,11 +205,26 @@ module Google
205
205
  extend ::Google::Protobuf::MessageExts::ClassMethods
206
206
  end
207
207
 
208
+ # Matcher for the {::Google::Cloud::DiscoveryEngine::V1::Document Document}s by
209
+ # FHIR resource names.
210
+ # @!attribute [rw] fhir_resources
211
+ # @return [::Array<::String>]
212
+ # Required. The FHIR resources to match by.
213
+ # Format:
214
+ # projects/\\{project}/locations/\\{location}/datasets/\\{dataset}/fhirStores/\\{fhir_store}/fhir/\\{resource_type}/\\{fhir_resource_id}
215
+ class FhirMatcher
216
+ include ::Google::Protobuf::MessageExts
217
+ extend ::Google::Protobuf::MessageExts::ClassMethods
218
+ end
219
+
208
220
  # Matcher for the {::Google::Cloud::DiscoveryEngine::V1::Document Document}s.
209
221
  # Currently supports matching by exact URIs.
210
222
  # @!attribute [rw] uris_matcher
211
223
  # @return [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest::UrisMatcher]
212
224
  # Matcher by exact URIs.
225
+ # @!attribute [rw] fhir_matcher
226
+ # @return [::Google::Cloud::DiscoveryEngine::V1::BatchGetDocumentsMetadataRequest::FhirMatcher]
227
+ # Matcher by FHIR resource names.
213
228
  class Matcher
214
229
  include ::Google::Protobuf::MessageExts
215
230
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -257,6 +272,10 @@ module Google
257
272
  # @return [::String]
258
273
  # If match by URI, the URI of the
259
274
  # {::Google::Cloud::DiscoveryEngine::V1::Document Document}.
275
+ # @!attribute [rw] fhir_resource
276
+ # @return [::String]
277
+ # Required. Format:
278
+ # projects/\\{project}/locations/\\{location}/datasets/\\{dataset}/fhirStores/\\{fhir_store}/fhir/\\{resource_type}/\\{fhir_resource_id}
260
279
  class MatcherValue
261
280
  include ::Google::Protobuf::MessageExts
262
281
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -47,7 +47,7 @@ module Google
47
47
  # characters.
48
48
  #
49
49
  # Format:
50
- # `projects/{project_number}/locations/{location}/collections/{collection}/engines/{engine}`
50
+ # `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`
51
51
  # engine should be 1-63 characters, and valid characters are
52
52
  # /[a-z0-9][a-z0-9-_]*/. Otherwise, an INVALID_ARGUMENT error is returned.
53
53
  # @!attribute [rw] display_name
@@ -93,6 +93,10 @@ module Google
93
93
  # @!attribute [rw] common_config
94
94
  # @return [::Google::Cloud::DiscoveryEngine::V1::Engine::CommonConfig]
95
95
  # Common config spec that specifies the metadata of the engine.
96
+ # @!attribute [rw] disable_analytics
97
+ # @return [::Boolean]
98
+ # Optional. Whether to disable analytics for searches performed on this
99
+ # engine.
96
100
  class Engine
97
101
  include ::Google::Protobuf::MessageExts
98
102
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -21,6 +21,389 @@ module Google
21
21
  module Cloud
22
22
  module DiscoveryEngine
23
23
  module V1
24
+ # Base structured datatype containing multi-part content of a message.
25
+ # @!attribute [rw] role
26
+ # @return [::String]
27
+ # Producer of the content. Must be either `user` or `model`.
28
+ #
29
+ # Intended to be used for multi-turn conversations. Otherwise, it can be left
30
+ # unset.
31
+ # @!attribute [rw] parts
32
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent::Part>]
33
+ # Ordered `Parts` that constitute a single message.
34
+ class GroundedGenerationContent
35
+ include ::Google::Protobuf::MessageExts
36
+ extend ::Google::Protobuf::MessageExts::ClassMethods
37
+
38
+ # Single part of content.
39
+ # @!attribute [rw] text
40
+ # @return [::String]
41
+ # Inline text.
42
+ class Part
43
+ include ::Google::Protobuf::MessageExts
44
+ extend ::Google::Protobuf::MessageExts::ClassMethods
45
+ end
46
+ end
47
+
48
+ # Top-level message sent by the client for the `GenerateGroundedContent`
49
+ # method.
50
+ # @!attribute [rw] location
51
+ # @return [::String]
52
+ # Required. Location resource.
53
+ #
54
+ # Format: `projects/{project}/locations/{location}`.
55
+ # @!attribute [rw] system_instruction
56
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent]
57
+ # Content of the system instruction for the current API.
58
+ #
59
+ # These instructions will take priority over any other prompt instructions
60
+ # if the selected model is supporting them.
61
+ # @!attribute [rw] contents
62
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent>]
63
+ # Content of the current conversation with the model.
64
+ #
65
+ # For single-turn queries, this is a single instance. For multi-turn queries,
66
+ # this is a repeated field that contains conversation history + latest
67
+ # request.
68
+ #
69
+ # Only a single-turn query is supported currently.
70
+ # @!attribute [rw] generation_spec
71
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GenerationSpec]
72
+ # Content generation specification.
73
+ # @!attribute [rw] grounding_spec
74
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSpec]
75
+ # Grounding specification.
76
+ # @!attribute [rw] user_labels
77
+ # @return [::Google::Protobuf::Map{::String => ::String}]
78
+ # The user labels applied to a resource must meet the following requirements:
79
+ #
80
+ # * Each resource can have multiple labels, up to a maximum of 64.
81
+ # * Each label must be a key-value pair.
82
+ # * Keys have a minimum length of 1 character and a maximum length of 63
83
+ # characters and cannot be empty. Values can be empty and have a maximum
84
+ # length of 63 characters.
85
+ # * Keys and values can contain only lowercase letters, numeric characters,
86
+ # underscores, and dashes. All characters must use UTF-8 encoding, and
87
+ # international characters are allowed.
88
+ # * The key portion of a label must be unique. However, you can use the same
89
+ # key with multiple resources.
90
+ # * Keys must start with a lowercase letter or international character.
91
+ #
92
+ # See [Google Cloud
93
+ # Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
94
+ # for more details.
95
+ class GenerateGroundedContentRequest
96
+ include ::Google::Protobuf::MessageExts
97
+ extend ::Google::Protobuf::MessageExts::ClassMethods
98
+
99
+ # Content generation specification.
100
+ # @!attribute [rw] model_id
101
+ # @return [::String]
102
+ # Specifies which Vertex model id to use for generation.
103
+ # @!attribute [rw] language_code
104
+ # @return [::String]
105
+ # Language code for content. Use language tags defined by
106
+ # [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
107
+ # @!attribute [rw] temperature
108
+ # @return [::Float]
109
+ # If specified, custom value for the temperature will be used.
110
+ # @!attribute [rw] top_p
111
+ # @return [::Float]
112
+ # If specified, custom value for nucleus sampling will be used.
113
+ # @!attribute [rw] top_k
114
+ # @return [::Integer]
115
+ # If specified, custom value for top-k sampling will be used.
116
+ # @!attribute [rw] frequency_penalty
117
+ # @return [::Float]
118
+ # If specified, custom value for frequency penalty will be used.
119
+ # @!attribute [rw] presence_penalty
120
+ # @return [::Float]
121
+ # If specified, custom value for presence penalty will be used.
122
+ # @!attribute [rw] max_output_tokens
123
+ # @return [::Integer]
124
+ # If specified, custom value for max output tokens will be used.
125
+ class GenerationSpec
126
+ include ::Google::Protobuf::MessageExts
127
+ extend ::Google::Protobuf::MessageExts::ClassMethods
128
+ end
129
+
130
+ # Describes the options to customize dynamic retrieval.
131
+ # @!attribute [rw] predictor
132
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor]
133
+ # Specification for the predictor for dynamic retrieval.
134
+ class DynamicRetrievalConfiguration
135
+ include ::Google::Protobuf::MessageExts
136
+ extend ::Google::Protobuf::MessageExts::ClassMethods
137
+
138
+ # Describes the predictor settings for dynamic retrieval.
139
+ # @!attribute [rw] version
140
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration::DynamicRetrievalPredictor::Version]
141
+ # The version of the predictor to be used in dynamic retrieval.
142
+ # @!attribute [rw] threshold
143
+ # @return [::Float]
144
+ # The value of the threshold. If the predictor will predict a
145
+ # value smaller than this, it would suppress grounding in the source.
146
+ class DynamicRetrievalPredictor
147
+ include ::Google::Protobuf::MessageExts
148
+ extend ::Google::Protobuf::MessageExts::ClassMethods
149
+
150
+ # The version of the predictor to be used in dynamic retrieval.
151
+ module Version
152
+ # Automatically choose the best version of the retrieval predictor.
153
+ VERSION_UNSPECIFIED = 0
154
+
155
+ # The V1 model which is evaluating each source independently.
156
+ V1_INDEPENDENT = 1
157
+ end
158
+ end
159
+ end
160
+
161
+ # Grounding source.
162
+ # @!attribute [rw] inline_source
163
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::InlineSource]
164
+ # If set, grounding is performed with inline content.
165
+ # @!attribute [rw] search_source
166
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::SearchSource]
167
+ # If set, grounding is performed with Vertex AI Search.
168
+ # @!attribute [rw] google_search_source
169
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::GoogleSearchSource]
170
+ # If set, grounding is performed with Google Search.
171
+ class GroundingSource
172
+ include ::Google::Protobuf::MessageExts
173
+ extend ::Google::Protobuf::MessageExts::ClassMethods
174
+
175
+ # Message to be used for grounding based on inline content.
176
+ # @!attribute [rw] grounding_facts
177
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>]
178
+ # List of facts to be used for grounding.
179
+ # @!attribute [rw] attributes
180
+ # @return [::Google::Protobuf::Map{::String => ::String}]
181
+ # Attributes associated with the content.
182
+ #
183
+ # Common attributes include `source` (indicating where the content was
184
+ # sourced from) and `author` (indicating the author of the content).
185
+ class InlineSource
186
+ include ::Google::Protobuf::MessageExts
187
+ extend ::Google::Protobuf::MessageExts::ClassMethods
188
+
189
+ # @!attribute [rw] key
190
+ # @return [::String]
191
+ # @!attribute [rw] value
192
+ # @return [::String]
193
+ class AttributesEntry
194
+ include ::Google::Protobuf::MessageExts
195
+ extend ::Google::Protobuf::MessageExts::ClassMethods
196
+ end
197
+ end
198
+
199
+ # Message to be used for grounding with Vertex AI Search.
200
+ # @!attribute [rw] serving_config
201
+ # @return [::String]
202
+ # The resource name of the Engine to use.
203
+ #
204
+ # Format:
205
+ # `projects/{project}/locations/{location}/collections/{collection_id}/engines/{engine_id}/servingConfigs/{serving_config_id}`
206
+ # @!attribute [rw] max_result_count
207
+ # @return [::Integer]
208
+ # Number of search results to return.
209
+ #
210
+ # The default value is 10. The maximumm allowed value is 10.
211
+ # @!attribute [rw] filter
212
+ # @return [::String]
213
+ # Filter expression to be applied to the search.
214
+ #
215
+ # The syntax is the same as
216
+ # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#filter SearchRequest.filter}.
217
+ # @!attribute [rw] safe_search
218
+ # @return [::Boolean]
219
+ # If set, safe search is enabled in Vertex AI Search requests.
220
+ class SearchSource
221
+ include ::Google::Protobuf::MessageExts
222
+ extend ::Google::Protobuf::MessageExts::ClassMethods
223
+ end
224
+
225
+ # Google Search config parameters.
226
+ # @!attribute [rw] dynamic_retrieval_config
227
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::DynamicRetrievalConfiguration]
228
+ # Optional. Specifies the dynamic retrieval configuration for the given
229
+ # source.
230
+ class GoogleSearchSource
231
+ include ::Google::Protobuf::MessageExts
232
+ extend ::Google::Protobuf::MessageExts::ClassMethods
233
+ end
234
+ end
235
+
236
+ # Grounding specification.
237
+ # @!attribute [rw] grounding_sources
238
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource>]
239
+ # Grounding sources.
240
+ class GroundingSpec
241
+ include ::Google::Protobuf::MessageExts
242
+ extend ::Google::Protobuf::MessageExts::ClassMethods
243
+ end
244
+
245
+ # @!attribute [rw] key
246
+ # @return [::String]
247
+ # @!attribute [rw] value
248
+ # @return [::String]
249
+ class UserLabelsEntry
250
+ include ::Google::Protobuf::MessageExts
251
+ extend ::Google::Protobuf::MessageExts::ClassMethods
252
+ end
253
+ end
254
+
255
+ # @!attribute [rw] candidates
256
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate>]
257
+ # Generated candidates.
258
+ class GenerateGroundedContentResponse
259
+ include ::Google::Protobuf::MessageExts
260
+ extend ::Google::Protobuf::MessageExts::ClassMethods
261
+
262
+ # A response candidate generated from the model.
263
+ # @!attribute [rw] index
264
+ # @return [::Integer]
265
+ # Index of the candidate.
266
+ # @!attribute [rw] content
267
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GroundedGenerationContent]
268
+ # Content of the candidate.
269
+ # @!attribute [rw] grounding_score
270
+ # @return [::Float]
271
+ # The overall grounding score for the candidate, in the range of [0, 1].
272
+ # @!attribute [rw] grounding_metadata
273
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata]
274
+ # Grounding metadata for the generated content.
275
+ class Candidate
276
+ include ::Google::Protobuf::MessageExts
277
+ extend ::Google::Protobuf::MessageExts::ClassMethods
278
+
279
+ # Citation for the generated content.
280
+ # @!attribute [rw] retrieval_metadata
281
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::RetrievalMetadata>]
282
+ # Retrieval metadata to provide an understanding in the
283
+ # retrieval steps performed by the model. There can be multiple such
284
+ # messages which can correspond to different parts of the retrieval. This
285
+ # is a mechanism used to ensure transparency to our users.
286
+ # @!attribute [rw] support_chunks
287
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::FactChunk>]
288
+ # List of chunks to be attributed across all claims in the candidate.
289
+ # These are derived from the grounding sources supplied in the request.
290
+ # @!attribute [rw] web_search_queries
291
+ # @return [::Array<::String>]
292
+ # Web search queries for the following-up web search.
293
+ # @!attribute [rw] search_entry_point
294
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::SearchEntryPoint]
295
+ # Google search entry for the following-up web searches.
296
+ # @!attribute [rw] grounding_support
297
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::GroundingSupport>]
298
+ # GroundingSupport across all claims in the answer candidate.
299
+ # An support to a fact indicates that the claim is supported by
300
+ # the fact.
301
+ class GroundingMetadata
302
+ include ::Google::Protobuf::MessageExts
303
+ extend ::Google::Protobuf::MessageExts::ClassMethods
304
+
305
+ # Describes the metadata associated with a retrieval step.
306
+ # @!attribute [rw] source
307
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::RetrievalMetadata::Source]
308
+ # Describes the source to which the metadata is referring to.
309
+ # @!attribute [rw] dynamic_retrieval_metadata
310
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::DynamicRetrievalMetadata]
311
+ # Metadata for dynamic retrieval.
312
+ class RetrievalMetadata
313
+ include ::Google::Protobuf::MessageExts
314
+ extend ::Google::Protobuf::MessageExts::ClassMethods
315
+
316
+ # Describes the source to which the metadata is associated to.
317
+ module Source
318
+ # Unspecified source.
319
+ SOURCE_UNSPECIFIED = 0
320
+
321
+ # Vertex AI search.
322
+ VERTEX_AI_SEARCH = 1
323
+
324
+ # Google Search.
325
+ GOOGLE_SEARCH = 3
326
+
327
+ # User inline provided content.
328
+ INLINE_CONTENT = 2
329
+
330
+ # Google Maps.
331
+ GOOGLE_MAPS = 4
332
+ end
333
+ end
334
+
335
+ # Describes the metadata about dynamic retrieval.
336
+ # @!attribute [rw] predictor_metadata
337
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::DynamicRetrievalPredictorMetadata]
338
+ # Metadata for the dynamic retrieval predictor.
339
+ class DynamicRetrievalMetadata
340
+ include ::Google::Protobuf::MessageExts
341
+ extend ::Google::Protobuf::MessageExts::ClassMethods
342
+ end
343
+
344
+ # Describes the metadata about the dynamic retrieval predictor.
345
+ # @!attribute [rw] version
346
+ # @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::DynamicRetrievalPredictorMetadata::Version]
347
+ # The version of the predictor which was used in dynamic retrieval.
348
+ # @!attribute [rw] prediction
349
+ # @return [::Float]
350
+ # The value of the predictor. This should be between [0, 1] where
351
+ # a value of 0 means that the query would not benefit from grounding,
352
+ # while a value of 1.0 means that the query would benefit the most.
353
+ # In between values allow to differentiate between different usefulness
354
+ # scores for grounding.
355
+ class DynamicRetrievalPredictorMetadata
356
+ include ::Google::Protobuf::MessageExts
357
+ extend ::Google::Protobuf::MessageExts::ClassMethods
358
+
359
+ # The version of the predictor which was used in dynamic retrieval.
360
+ module Version
361
+ # Unspecified version, should never be used.
362
+ VERSION_UNSPECIFIED = 0
363
+
364
+ # The V1 model which is evaluating each source independently.
365
+ V1_INDEPENDENT = 1
366
+ end
367
+ end
368
+
369
+ # Google search entry point.
370
+ # @!attribute [rw] rendered_content
371
+ # @return [::String]
372
+ # Web content snippet that can be embedded in a web page or an app
373
+ # webview.
374
+ # @!attribute [rw] sdk_blob
375
+ # @return [::String]
376
+ # Base64 encoded JSON representing array of <search term, search url>
377
+ # tuple.
378
+ class SearchEntryPoint
379
+ include ::Google::Protobuf::MessageExts
380
+ extend ::Google::Protobuf::MessageExts::ClassMethods
381
+ end
382
+
383
+ # Grounding info for a claim in the candidate and its support.
384
+ # @!attribute [rw] claim_text
385
+ # @return [::String]
386
+ # Text for the claim in the candidate. Always provided when a
387
+ # support is found.
388
+ # @!attribute [rw] support_chunk_indices
389
+ # @return [::Array<::Integer>]
390
+ # A list of indices (into 'support_chunks') specifying the
391
+ # citations associated with the claim. For instance [1,3,4] means
392
+ # that support_chunks[1], support_chunks[3],
393
+ # support_chunks[4] are the chunks attributed to the claim.
394
+ # @!attribute [rw] support_score
395
+ # @return [::Float]
396
+ # A score in the range of [0, 1] describing how grounded is a specific
397
+ # claim in the support chunks indicated.
398
+ # Higher value means that the claim is better supported by the chunks.
399
+ class GroundingSupport
400
+ include ::Google::Protobuf::MessageExts
401
+ extend ::Google::Protobuf::MessageExts::ClassMethods
402
+ end
403
+ end
404
+ end
405
+ end
406
+
24
407
  # Specification for the grounding check.
25
408
  # @!attribute [rw] citation_threshold
26
409
  # @return [::Float]
@@ -25,7 +25,7 @@ module Google
25
25
  # @!attribute [r] name
26
26
  # @return [::String]
27
27
  # Output only. Full resource name of the project, for example
28
- # `projects/{project_number}`.
28
+ # `projects/{project}`.
29
29
  # Note that when making requests, project number and project id are both
30
30
  # acceptable, but the server will always respond in project number.
31
31
  # @!attribute [r] create_time
@@ -26,7 +26,7 @@ module Google
26
26
  # @return [::String]
27
27
  # Required. The resource name of the catalog under which the events are
28
28
  # created. The format is
29
- # `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`
29
+ # `projects/{project}/locations/global/collections/{collection}/dataStores/{dataStore}`.
30
30
  # @!attribute [rw] filter
31
31
  # @return [::String]
32
32
  # Required. The filter string to specify the events to be deleted with a
@@ -53,7 +53,7 @@ module Google
53
53
  # @!attribute [rw] ranking_config
54
54
  # @return [::String]
55
55
  # Required. The resource name of the rank service config, such as
56
- # `projects/{project_num}/locations/{location_id}/rankingConfigs/default_ranking_config`.
56
+ # `projects/{project_num}/locations/{location}/rankingConfigs/default_ranking_config`.
57
57
  # @!attribute [rw] model
58
58
  # @return [::String]
59
59
  # The identifier of the model to use. It is one of:
@@ -76,6 +76,11 @@ module Google
76
76
  # unset.
77
77
  #
78
78
  # If this field is negative, an `INVALID_ARGUMENT` is returned.
79
+ # @!attribute [rw] one_box_page_size
80
+ # @return [::Integer]
81
+ # The maximum number of results to return for OneBox.
82
+ # This applies to each OneBox type individually.
83
+ # Default number is 10.
79
84
  # @!attribute [rw] data_store_specs
80
85
  # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>]
81
86
  # Specs defining dataStores to filter on in a search call and configurations
@@ -278,6 +283,11 @@ module Google
278
283
  # Required. Full resource name of
279
284
  # {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}, such as
280
285
  # `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}`.
286
+ # @!attribute [rw] filter
287
+ # @return [::String]
288
+ # Optional. Filter specification to filter documents in the data store
289
+ # specified by data_store field. For more information on filtering, see
290
+ # [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
281
291
  class DataStoreSpec
282
292
  include ::Google::Protobuf::MessageExts
283
293
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -468,9 +478,93 @@ module Google
468
478
  # ignored. Only one of the (condition, boost) combination or the
469
479
  # boost_control_spec below are set. If both are set then the global boost
470
480
  # is ignored and the more fine-grained boost_control_spec is applied.
481
+ # @!attribute [rw] boost_control_spec
482
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec::ConditionBoostSpec::BoostControlSpec]
483
+ # Complex specification for custom ranking based on customer defined
484
+ # attribute value.
471
485
  class ConditionBoostSpec
472
486
  include ::Google::Protobuf::MessageExts
473
487
  extend ::Google::Protobuf::MessageExts::ClassMethods
488
+
489
+ # Specification for custom ranking based on customer specified attribute
490
+ # value. It provides more controls for customized ranking than the simple
491
+ # (condition, boost) combination above.
492
+ # @!attribute [rw] field_name
493
+ # @return [::String]
494
+ # The name of the field whose value will be used to determine the
495
+ # boost amount.
496
+ # @!attribute [rw] attribute_type
497
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec::ConditionBoostSpec::BoostControlSpec::AttributeType]
498
+ # The attribute type to be used to determine the boost amount. The
499
+ # attribute value can be derived from the field value of the specified
500
+ # field_name. In the case of numerical it is straightforward i.e.
501
+ # attribute_value = numerical_field_value. In the case of freshness
502
+ # however, attribute_value = (time.now() - datetime_field_value).
503
+ # @!attribute [rw] interpolation_type
504
+ # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec::ConditionBoostSpec::BoostControlSpec::InterpolationType]
505
+ # The interpolation type to be applied to connect the control points
506
+ # listed below.
507
+ # @!attribute [rw] control_points
508
+ # @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec::ConditionBoostSpec::BoostControlSpec::ControlPoint>]
509
+ # The control points used to define the curve. The monotonic function
510
+ # (defined through the interpolation_type above) passes through the
511
+ # control points listed here.
512
+ class BoostControlSpec
513
+ include ::Google::Protobuf::MessageExts
514
+ extend ::Google::Protobuf::MessageExts::ClassMethods
515
+
516
+ # The control points used to define the curve. The curve defined
517
+ # through these control points can only be monotonically increasing
518
+ # or decreasing(constant values are acceptable).
519
+ # @!attribute [rw] attribute_value
520
+ # @return [::String]
521
+ # Can be one of:
522
+ # 1. The numerical field value.
523
+ # 2. The duration spec for freshness:
524
+ # The value must be formatted as an XSD `dayTimeDuration` value (a
525
+ # restricted subset of an ISO 8601 duration value). The pattern for
526
+ # this is: `[nD][T[nH][nM][nS]]`.
527
+ # @!attribute [rw] boost_amount
528
+ # @return [::Float]
529
+ # The value between -1 to 1 by which to boost the score if the
530
+ # attribute_value evaluates to the value specified above.
531
+ class ControlPoint
532
+ include ::Google::Protobuf::MessageExts
533
+ extend ::Google::Protobuf::MessageExts::ClassMethods
534
+ end
535
+
536
+ # The attribute(or function) for which the custom ranking is to be
537
+ # applied.
538
+ module AttributeType
539
+ # Unspecified AttributeType.
540
+ ATTRIBUTE_TYPE_UNSPECIFIED = 0
541
+
542
+ # The value of the numerical field will be used to dynamically update
543
+ # the boost amount. In this case, the attribute_value (the x value)
544
+ # of the control point will be the actual value of the numerical
545
+ # field for which the boost_amount is specified.
546
+ NUMERICAL = 1
547
+
548
+ # For the freshness use case the attribute value will be the duration
549
+ # between the current time and the date in the datetime field
550
+ # specified. The value must be formatted as an XSD `dayTimeDuration`
551
+ # value (a restricted subset of an ISO 8601 duration value). The
552
+ # pattern for this is: `[nD][T[nH][nM][nS]]`.
553
+ # For example, `5D`, `3DT12H30M`, `T24H`.
554
+ FRESHNESS = 2
555
+ end
556
+
557
+ # The interpolation type to be applied. Default will be linear
558
+ # (Piecewise Linear).
559
+ module InterpolationType
560
+ # Interpolation type is unspecified. In this case, it defaults to
561
+ # Linear.
562
+ INTERPOLATION_TYPE_UNSPECIFIED = 0
563
+
564
+ # Piecewise linear interpolation will be applied.
565
+ LINEAR = 1
566
+ end
567
+ end
474
568
  end
475
569
  end
476
570
 
@@ -650,6 +744,19 @@ module Google
650
744
  # If this field is set to `false`, all search results are used regardless
651
745
  # of relevance to generate answers. If set to `true`, only queries with
652
746
  # high relevance search results will generate answers.
747
+ # @!attribute [rw] ignore_jail_breaking_query
748
+ # @return [::Boolean]
749
+ # Optional. Specifies whether to filter out jail-breaking queries. The
750
+ # default value is `false`.
751
+ #
752
+ # Google employs search-query classification to detect jail-breaking
753
+ # queries. No summary is returned if the search query is classified as a
754
+ # jail-breaking query. A user might add instructions to the query to
755
+ # change the tone, style, language, content of the answer, or ask the
756
+ # model to act as a different entity, e.g. "Reply in the tone of a
757
+ # competing company's CEO". If this field is set to `true`, we skip
758
+ # generating summaries for jail-breaking queries and return fallback
759
+ # messages instead.
653
760
  # @!attribute [rw] model_prompt_spec
654
761
  # @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec::ModelPromptSpec]
655
762
  # If specified, the spec will be used to modify the prompt provided to
@@ -1132,6 +1239,7 @@ module Google
1132
1239
 
1133
1240
  # The non-summary seeking query ignored case.
1134
1241
  #
1242
+ # Google skips the summary if the query is chit chat.
1135
1243
  # Only used when
1136
1244
  # {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#ignore_non_summary_seeking_query SummarySpec.ignore_non_summary_seeking_query}
1137
1245
  # is set to `true`.
@@ -1174,6 +1282,14 @@ module Google
1174
1282
  # Google skips the summary if there is a customer policy violation
1175
1283
  # detected. The policy is defined by the customer.
1176
1284
  CUSTOMER_POLICY_VIOLATION = 8
1285
+
1286
+ # The non-answer seeking query ignored case.
1287
+ #
1288
+ # Google skips the summary if the query doesn't have clear intent.
1289
+ # Only used when
1290
+ # [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
1291
+ # is set to `true`.
1292
+ NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9
1177
1293
  end
1178
1294
  end
1179
1295
 
@@ -346,6 +346,11 @@ module Google
346
346
  # an INVALID_ARGUMENT error is thrown. Each URI should match at least one
347
347
  # {::Google::Cloud::DiscoveryEngine::V1::TargetSite TargetSite} in
348
348
  # `site_search_engine`.
349
+ # @!attribute [rw] site_credential
350
+ # @return [::String]
351
+ # Optional. Full resource name of the [SiteCredential][], such as
352
+ # `projects/*/locations/*/collections/*/dataStores/*/siteSearchEngine/siteCredentials/*`.
353
+ # Only set to crawl private URIs.
349
354
  class RecrawlUrisRequest
350
355
  include ::Google::Protobuf::MessageExts
351
356
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -427,7 +427,7 @@ module Google
427
427
  # @return [::String]
428
428
  # The {::Google::Cloud::DiscoveryEngine::V1::Document Document} resource full
429
429
  # name, of the form:
430
- # `projects/{project_id}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
430
+ # `projects/{project}/locations/{location}/collections/{collection_id}/dataStores/{data_store_id}/branches/{branch_id}/documents/{document_id}`
431
431
  # @!attribute [rw] uri
432
432
  # @return [::String]
433
433
  # The {::Google::Cloud::DiscoveryEngine::V1::Document Document} URI - only