google-cloud-discovery_engine-v1 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +186 -4
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +181 -4
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +72 -0
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +8 -2
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +8 -2
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +1 -3
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +1 -3
- data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +3 -3
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +3 -3
- data/lib/google/cloud/discovery_engine/v1/rest.rb +1 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +44 -12
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +44 -12
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/client.rb +484 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/paths.rb +101 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/rest/client.rb +451 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/rest/service_stub.rb +159 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service/rest.rb +53 -0
- data/lib/google/cloud/discovery_engine/v1/serving_config_service.rb +56 -0
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +316 -3
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/paths.rb +49 -0
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +295 -3
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/service_stub.rb +206 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +21 -9
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +21 -9
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +8 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +1 -0
- data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/control_pb.rb +7 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +12 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +8 -0
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/document_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/engine_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_pb.rb +6 -1
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/safety_pb.rb +47 -0
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +5 -1
- data/lib/google/cloud/discoveryengine/v1/serving_config_pb.rb +52 -0
- data/lib/google/cloud/discoveryengine/v1/serving_config_service_pb.rb +51 -0
- data/lib/google/cloud/discoveryengine/v1/serving_config_service_services_pb.rb +48 -0
- data/lib/google/cloud/discoveryengine/v1/session_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_pb.rb +10 -1
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_service_services_pb.rb +7 -0
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
- data/proto_docs/google/api/client.rb +6 -0
- data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +53 -2
- data/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +2 -1
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +40 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control.rb +122 -7
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +159 -2
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +25 -4
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +7 -2
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +16 -3
- data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +90 -12
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +19 -1
- data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +9 -5
- data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +3 -1
- data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +3 -3
- data/proto_docs/google/cloud/discoveryengine/v1/safety.rb +108 -0
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +109 -8
- data/proto_docs/google/cloud/discoveryengine/v1/serving_config.rb +261 -0
- data/proto_docs/google/cloud/discoveryengine/v1/serving_config_service.rb +44 -0
- data/proto_docs/google/cloud/discoveryengine/v1/session.rb +18 -0
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +19 -2
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine_service.rb +146 -4
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +34 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +12 -4
- metadata +17 -3
@@ -124,7 +124,7 @@ module Google
|
|
124
124
|
# Otherwise, an `ALREADY_EXISTS` error is returned.
|
125
125
|
#
|
126
126
|
# This field must conform to [RFC-1034](https://tools.ietf.org/html/rfc1034)
|
127
|
-
# standard with a length limit of
|
127
|
+
# standard with a length limit of 128 characters. Otherwise, an
|
128
128
|
# `INVALID_ARGUMENT` error is returned.
|
129
129
|
class CreateDocumentRequest
|
130
130
|
include ::Google::Protobuf::MessageExts
|
@@ -91,9 +91,8 @@ module Google
|
|
91
91
|
# @return [::Google::Cloud::DiscoveryEngine::V1::IndustryVertical]
|
92
92
|
# The industry vertical that the engine registers.
|
93
93
|
# The restriction of the Engine industry vertical is based on
|
94
|
-
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}:
|
95
|
-
#
|
96
|
-
# DataStore linked to the engine.
|
94
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}: Vertical on Engine
|
95
|
+
# has to match vertical of the DataStore linked to the engine.
|
97
96
|
# @!attribute [rw] common_config
|
98
97
|
# @return [::Google::Cloud::DiscoveryEngine::V1::Engine::CommonConfig]
|
99
98
|
# Common config spec that specifies the metadata of the engine.
|
@@ -153,6 +152,20 @@ module Google
|
|
153
152
|
# API after engine creation. Use
|
154
153
|
# {::Google::Cloud::DiscoveryEngine::V1::Engine::ChatEngineMetadata#dialogflow_agent ChatEngineMetadata.dialogflow_agent}
|
155
154
|
# for actual agent association after Engine is created.
|
155
|
+
# @!attribute [rw] allow_cross_region
|
156
|
+
# @return [::Boolean]
|
157
|
+
# Optional. If the flag set to true, we allow the agent and engine are in
|
158
|
+
# different locations, otherwise the agent and engine are required to be in
|
159
|
+
# the same location. The flag is set to false by default.
|
160
|
+
#
|
161
|
+
# Note that the `allow_cross_region` are one-time consumed by and
|
162
|
+
# passed to
|
163
|
+
# {::Google::Cloud::DiscoveryEngine::V1::EngineService::Client#create_engine EngineService.CreateEngine}.
|
164
|
+
# It means they cannot be retrieved using
|
165
|
+
# {::Google::Cloud::DiscoveryEngine::V1::EngineService::Client#get_engine EngineService.GetEngine}
|
166
|
+
# or
|
167
|
+
# {::Google::Cloud::DiscoveryEngine::V1::EngineService::Client#list_engines EngineService.ListEngines}
|
168
|
+
# API after engine creation.
|
156
169
|
class ChatEngineConfig
|
157
170
|
include ::Google::Protobuf::MessageExts
|
158
171
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -65,8 +65,6 @@ module Google
|
|
65
65
|
# For single-turn queries, this is a single instance. For multi-turn queries,
|
66
66
|
# this is a repeated field that contains conversation history + latest
|
67
67
|
# request.
|
68
|
-
#
|
69
|
-
# Only a single-turn query is supported currently.
|
70
68
|
# @!attribute [rw] generation_spec
|
71
69
|
# @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GenerationSpec]
|
72
70
|
# Content generation specification.
|
@@ -116,6 +114,9 @@ module Google
|
|
116
114
|
# @!attribute [rw] frequency_penalty
|
117
115
|
# @return [::Float]
|
118
116
|
# If specified, custom value for frequency penalty will be used.
|
117
|
+
# @!attribute [rw] seed
|
118
|
+
# @return [::Integer]
|
119
|
+
# If specified, custom value for the seed will be used.
|
119
120
|
# @!attribute [rw] presence_penalty
|
120
121
|
# @return [::Float]
|
121
122
|
# If specified, custom value for presence penalty will be used.
|
@@ -163,17 +164,22 @@ module Google
|
|
163
164
|
# @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::InlineSource]
|
164
165
|
# If set, grounding is performed with inline content.
|
165
166
|
#
|
166
|
-
# Note: The following fields are mutually exclusive: `inline_source`, `search_source`, `google_search_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
167
|
+
# Note: The following fields are mutually exclusive: `inline_source`, `search_source`, `google_search_source`, `enterprise_web_retrieval_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
167
168
|
# @!attribute [rw] search_source
|
168
169
|
# @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::SearchSource]
|
169
170
|
# If set, grounding is performed with Vertex AI Search.
|
170
171
|
#
|
171
|
-
# Note: The following fields are mutually exclusive: `search_source`, `inline_source`, `google_search_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
172
|
+
# Note: The following fields are mutually exclusive: `search_source`, `inline_source`, `google_search_source`, `enterprise_web_retrieval_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
172
173
|
# @!attribute [rw] google_search_source
|
173
174
|
# @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::GoogleSearchSource]
|
174
175
|
# If set, grounding is performed with Google Search.
|
175
176
|
#
|
176
|
-
# Note: The following fields are mutually exclusive: `google_search_source`, `inline_source`, `search_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
177
|
+
# Note: The following fields are mutually exclusive: `google_search_source`, `inline_source`, `search_source`, `enterprise_web_retrieval_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
178
|
+
# @!attribute [rw] enterprise_web_retrieval_source
|
179
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentRequest::GroundingSource::EnterpriseWebRetrievalSource]
|
180
|
+
# If set, grounding is performed with enterprise web retrieval.
|
181
|
+
#
|
182
|
+
# Note: The following fields are mutually exclusive: `enterprise_web_retrieval_source`, `inline_source`, `search_source`, `google_search_source`. If a field in that set is populated, all other fields in the set will automatically be cleared.
|
177
183
|
class GroundingSource
|
178
184
|
include ::Google::Protobuf::MessageExts
|
179
185
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -237,6 +243,12 @@ module Google
|
|
237
243
|
include ::Google::Protobuf::MessageExts
|
238
244
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
239
245
|
end
|
246
|
+
|
247
|
+
# Params for using enterprise web retrieval as grounding source.
|
248
|
+
class EnterpriseWebRetrievalSource
|
249
|
+
include ::Google::Protobuf::MessageExts
|
250
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
251
|
+
end
|
240
252
|
end
|
241
253
|
|
242
254
|
# Grounding specification.
|
@@ -258,6 +270,7 @@ module Google
|
|
258
270
|
end
|
259
271
|
end
|
260
272
|
|
273
|
+
# Response for the `GenerateGroundedContent` method.
|
261
274
|
# @!attribute [rw] candidates
|
262
275
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate>]
|
263
276
|
# Generated candidates.
|
@@ -304,6 +317,9 @@ module Google
|
|
304
317
|
# GroundingSupport across all claims in the answer candidate.
|
305
318
|
# An support to a fact indicates that the claim is supported by
|
306
319
|
# the fact.
|
320
|
+
# @!attribute [rw] images
|
321
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::ImageMetadata>]
|
322
|
+
# Images from the web search.
|
307
323
|
class GroundingMetadata
|
308
324
|
include ::Google::Protobuf::MessageExts
|
309
325
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -406,6 +422,48 @@ module Google
|
|
406
422
|
include ::Google::Protobuf::MessageExts
|
407
423
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
408
424
|
end
|
425
|
+
|
426
|
+
# Metadata about an image from the web search.
|
427
|
+
# @!attribute [rw] image
|
428
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::ImageMetadata::Image]
|
429
|
+
# Metadata about the full size image.
|
430
|
+
# @!attribute [rw] thumbnail
|
431
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::ImageMetadata::Image]
|
432
|
+
# Metadata about the thumbnail.
|
433
|
+
# @!attribute [rw] source
|
434
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::GenerateGroundedContentResponse::Candidate::GroundingMetadata::ImageMetadata::WebsiteInfo]
|
435
|
+
# The details about the website that the image is from.
|
436
|
+
class ImageMetadata
|
437
|
+
include ::Google::Protobuf::MessageExts
|
438
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
439
|
+
|
440
|
+
# Metadata about the website that the image is from.
|
441
|
+
# @!attribute [rw] uri
|
442
|
+
# @return [::String]
|
443
|
+
# The url of the website.
|
444
|
+
# @!attribute [rw] title
|
445
|
+
# @return [::String]
|
446
|
+
# The title of the website.
|
447
|
+
class WebsiteInfo
|
448
|
+
include ::Google::Protobuf::MessageExts
|
449
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
450
|
+
end
|
451
|
+
|
452
|
+
# Metadata about the image.
|
453
|
+
# @!attribute [rw] uri
|
454
|
+
# @return [::String]
|
455
|
+
# The url of the image.
|
456
|
+
# @!attribute [rw] width
|
457
|
+
# @return [::Integer]
|
458
|
+
# The width of the image in pixels.
|
459
|
+
# @!attribute [rw] height
|
460
|
+
# @return [::Integer]
|
461
|
+
# The height of the image in pixels.
|
462
|
+
class Image
|
463
|
+
include ::Google::Protobuf::MessageExts
|
464
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
465
|
+
end
|
466
|
+
end
|
409
467
|
end
|
410
468
|
end
|
411
469
|
end
|
@@ -432,7 +490,7 @@ module Google
|
|
432
490
|
# `projects/*/locations/global/groundingConfigs/default_grounding_config`.
|
433
491
|
# @!attribute [rw] answer_candidate
|
434
492
|
# @return [::String]
|
435
|
-
# Answer candidate to check.
|
493
|
+
# Answer candidate to check. It can have a maximum length of 4096 tokens.
|
436
494
|
# @!attribute [rw] facts
|
437
495
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::GroundingFact>]
|
438
496
|
# List of facts for the grounding check.
|
@@ -485,6 +543,10 @@ module Google
|
|
485
543
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::FactChunk>]
|
486
544
|
# List of facts cited across all claims in the answer candidate.
|
487
545
|
# These are derived from the facts supplied in the request.
|
546
|
+
# @!attribute [rw] cited_facts
|
547
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::CheckGroundingFactChunk>]
|
548
|
+
# List of facts cited across all claims in the answer candidate.
|
549
|
+
# These are derived from the facts supplied in the request.
|
488
550
|
# @!attribute [rw] claims
|
489
551
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim>]
|
490
552
|
# Claim texts and citation info across all claims in the answer candidate.
|
@@ -492,15 +554,34 @@ module Google
|
|
492
554
|
include ::Google::Protobuf::MessageExts
|
493
555
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
494
556
|
|
557
|
+
# Fact chunk for grounding check.
|
558
|
+
# @!attribute [rw] chunk_text
|
559
|
+
# @return [::String]
|
560
|
+
# Text content of the fact chunk. Can be at most 10K characters long.
|
561
|
+
class CheckGroundingFactChunk
|
562
|
+
include ::Google::Protobuf::MessageExts
|
563
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
564
|
+
end
|
565
|
+
|
495
566
|
# Text and citation info for a claim in the answer candidate.
|
496
567
|
# @!attribute [rw] start_pos
|
497
568
|
# @return [::Integer]
|
498
569
|
# Position indicating the start of the claim in the answer candidate,
|
499
|
-
# measured in bytes.
|
570
|
+
# measured in bytes. Note that this is not measured in characters and,
|
571
|
+
# therefore, must be rendered in the user interface keeping in mind that
|
572
|
+
# some characters may take more than one byte. For example,
|
573
|
+
# if the claim text contains non-ASCII characters, the start and end
|
574
|
+
# positions vary when measured in characters
|
575
|
+
# (programming-language-dependent) and when measured in bytes
|
576
|
+
# (programming-language-independent).
|
500
577
|
# @!attribute [rw] end_pos
|
501
578
|
# @return [::Integer]
|
502
579
|
# Position indicating the end of the claim in the answer candidate,
|
503
|
-
# exclusive.
|
580
|
+
# exclusive, in bytes. Note that this is not measured in characters and,
|
581
|
+
# therefore, must be rendered as such. For example, if the claim text
|
582
|
+
# contains non-ASCII characters, the start and end positions vary when
|
583
|
+
# measured in characters (programming-language-dependent) and when measured
|
584
|
+
# in bytes (programming-language-independent).
|
504
585
|
# @!attribute [rw] claim_text
|
505
586
|
# @return [::String]
|
506
587
|
# Text for the claim in the answer candidate. Always provided regardless of
|
@@ -518,10 +599,7 @@ module Google
|
|
518
599
|
# decided this claim doesn't require attribution/grounding check, this
|
519
600
|
# field will be set to false. In that case, no grounding check was done for
|
520
601
|
# the claim and therefore
|
521
|
-
# {::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim#citation_indices citation_indices}
|
522
|
-
# [anti_citation_indices][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.anti_citation_indices],
|
523
|
-
# and
|
524
|
-
# [score][google.cloud.discoveryengine.v1.CheckGroundingResponse.Claim.score]
|
602
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CheckGroundingResponse::Claim#citation_indices citation_indices}
|
525
603
|
# should not be returned.
|
526
604
|
class Claim
|
527
605
|
include ::Google::Protobuf::MessageExts
|
@@ -224,7 +224,7 @@ module Google
|
|
224
224
|
# The type of values in a Bigtable column or column family.
|
225
225
|
# The values are expected to be encoded using
|
226
226
|
# [HBase
|
227
|
-
# Bytes.toBytes](https://hbase.apache.org/apidocs/org/apache/hadoop/hbase/util/Bytes.html)
|
227
|
+
# Bytes.toBytes](https://hbase.apache.org/1.4/apidocs/org/apache/hadoop/hbase/util/Bytes.html)
|
228
228
|
# function when the encoding value is set to `BINARY`.
|
229
229
|
module Type
|
230
230
|
# The type is unspecified.
|
@@ -303,6 +303,17 @@ module Google
|
|
303
303
|
# all [supported FHIR resource
|
304
304
|
# types](https://cloud.google.com/generative-ai-app-builder/docs/fhir-schema-reference#resource-level-specification).
|
305
305
|
# Default to all supported FHIR resource types if empty.
|
306
|
+
# @!attribute [rw] update_from_latest_predefined_schema
|
307
|
+
# @return [::Boolean]
|
308
|
+
# Optional. Whether to update the DataStore schema to the latest predefined
|
309
|
+
# schema.
|
310
|
+
#
|
311
|
+
# If true, the DataStore schema will be updated to include any FHIR fields
|
312
|
+
# or resource types that have been added since the last import and
|
313
|
+
# corresponding FHIR resources will be imported from the FHIR store.
|
314
|
+
#
|
315
|
+
# Note this field cannot be used in conjunction with `resource_types`. It
|
316
|
+
# should be used after initial import.
|
306
317
|
class FhirStoreSource
|
307
318
|
include ::Google::Protobuf::MessageExts
|
308
319
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -647,6 +658,13 @@ module Google
|
|
647
658
|
# * {::Google::Cloud::DiscoveryEngine::V1::CloudSqlSource CloudSqlSource}.
|
648
659
|
# * {::Google::Cloud::DiscoveryEngine::V1::FirestoreSource FirestoreSource}.
|
649
660
|
# * {::Google::Cloud::DiscoveryEngine::V1::BigtableSource BigtableSource}.
|
661
|
+
# @!attribute [rw] force_refresh_content
|
662
|
+
# @return [::Boolean]
|
663
|
+
# Optional. Whether to force refresh the unstructured content of the
|
664
|
+
# documents.
|
665
|
+
#
|
666
|
+
# If set to `true`, the content part of the documents will be refreshed
|
667
|
+
# regardless of the update status of the referencing content.
|
650
668
|
class ImportDocumentsRequest
|
651
669
|
include ::Google::Protobuf::MessageExts
|
652
670
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -41,16 +41,20 @@ module Google
|
|
41
41
|
# * `userId`: Double quoted string. Specifying this will delete all events
|
42
42
|
# associated with a user.
|
43
43
|
#
|
44
|
+
# Note: This API only supports purging a max range of 30 days.
|
45
|
+
#
|
44
46
|
# Examples:
|
45
47
|
#
|
46
48
|
# * Deleting all events in a time range:
|
47
49
|
# `eventTime > "2012-04-23T18:25:43.511Z"
|
48
50
|
# eventTime < "2012-04-23T18:30:43.511Z"`
|
49
|
-
# * Deleting specific eventType:
|
50
|
-
# `
|
51
|
-
#
|
52
|
-
#
|
53
|
-
#
|
51
|
+
# * Deleting specific eventType in a time range:
|
52
|
+
# `eventTime > "2012-04-23T18:25:43.511Z"
|
53
|
+
# eventTime < "2012-04-23T18:30:43.511Z" eventType = "search"`
|
54
|
+
# * Deleting all events for a specific visitor in a time range:
|
55
|
+
# `eventTime > "2012-04-23T18:25:43.511Z"
|
56
|
+
# eventTime < "2012-04-23T18:30:43.511Z" userPseudoId = "visitor1024"`
|
57
|
+
# * Deleting the past 30 days of events inside a DataStore:
|
54
58
|
# `*`
|
55
59
|
#
|
56
60
|
# The filtering fields are assumed to have an implicit AND.
|
@@ -43,6 +43,8 @@ module Google
|
|
43
43
|
# @!attribute [rw] score
|
44
44
|
# @return [::Float]
|
45
45
|
# The score of this record based on the given query and selected model.
|
46
|
+
# The score will be rounded to 2 decimal places. If the score is close to 0,
|
47
|
+
# it will be rounded to 0.0001 to avoid returning unset.
|
46
48
|
class RankingRecord
|
47
49
|
include ::Google::Protobuf::MessageExts
|
48
50
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -58,7 +60,7 @@ module Google
|
|
58
60
|
# @return [::String]
|
59
61
|
# The identifier of the model to use. It is one of:
|
60
62
|
#
|
61
|
-
# * `semantic-ranker-512@latest`: Semantic ranking model with
|
63
|
+
# * `semantic-ranker-512@latest`: Semantic ranking model with maximum input
|
62
64
|
# token size 512.
|
63
65
|
#
|
64
66
|
# It is set to `semantic-ranker-512@latest` by default if unspecified.
|
@@ -25,7 +25,7 @@ module Google
|
|
25
25
|
# @!attribute [rw] serving_config
|
26
26
|
# @return [::String]
|
27
27
|
# Required. Full resource name of a
|
28
|
-
#
|
28
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ServingConfig ServingConfig}:
|
29
29
|
# `projects/*/locations/global/collections/*/engines/*/servingConfigs/*`, or
|
30
30
|
# `projects/*/locations/global/collections/*/dataStores/*/servingConfigs/*`
|
31
31
|
#
|
@@ -77,9 +77,9 @@ module Google
|
|
77
77
|
# attribute-based expressions are expected instead of the above described
|
78
78
|
# tag-based syntax. Examples:
|
79
79
|
#
|
80
|
-
# * (
|
80
|
+
# * (language: ANY("en", "es")) AND NOT (categories: ANY("Movie"))
|
81
81
|
# * (available: true) AND
|
82
|
-
# (
|
82
|
+
# (language: ANY("en", "es")) OR (categories: ANY("Movie"))
|
83
83
|
#
|
84
84
|
# If your filter blocks all results, the API returns generic
|
85
85
|
# (unfiltered) popular Documents. If you only want results strictly matching
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2025 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
|
+
# Safety rating corresponding to the generated content.
|
25
|
+
# @!attribute [r] category
|
26
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::HarmCategory]
|
27
|
+
# Output only. Harm category.
|
28
|
+
# @!attribute [r] probability
|
29
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SafetyRating::HarmProbability]
|
30
|
+
# Output only. Harm probability levels in the content.
|
31
|
+
# @!attribute [r] probability_score
|
32
|
+
# @return [::Float]
|
33
|
+
# Output only. Harm probability score.
|
34
|
+
# @!attribute [r] severity
|
35
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SafetyRating::HarmSeverity]
|
36
|
+
# Output only. Harm severity levels in the content.
|
37
|
+
# @!attribute [r] severity_score
|
38
|
+
# @return [::Float]
|
39
|
+
# Output only. Harm severity score.
|
40
|
+
# @!attribute [r] blocked
|
41
|
+
# @return [::Boolean]
|
42
|
+
# Output only. Indicates whether the content was filtered out because of this
|
43
|
+
# rating.
|
44
|
+
class SafetyRating
|
45
|
+
include ::Google::Protobuf::MessageExts
|
46
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
47
|
+
|
48
|
+
# Harm probability levels in the content.
|
49
|
+
module HarmProbability
|
50
|
+
# Harm probability unspecified.
|
51
|
+
HARM_PROBABILITY_UNSPECIFIED = 0
|
52
|
+
|
53
|
+
# Negligible level of harm.
|
54
|
+
NEGLIGIBLE = 1
|
55
|
+
|
56
|
+
# Low level of harm.
|
57
|
+
LOW = 2
|
58
|
+
|
59
|
+
# Medium level of harm.
|
60
|
+
MEDIUM = 3
|
61
|
+
|
62
|
+
# High level of harm.
|
63
|
+
HIGH = 4
|
64
|
+
end
|
65
|
+
|
66
|
+
# Harm severity levels.
|
67
|
+
module HarmSeverity
|
68
|
+
# Harm severity unspecified.
|
69
|
+
HARM_SEVERITY_UNSPECIFIED = 0
|
70
|
+
|
71
|
+
# Negligible level of harm severity.
|
72
|
+
HARM_SEVERITY_NEGLIGIBLE = 1
|
73
|
+
|
74
|
+
# Low level of harm severity.
|
75
|
+
HARM_SEVERITY_LOW = 2
|
76
|
+
|
77
|
+
# Medium level of harm severity.
|
78
|
+
HARM_SEVERITY_MEDIUM = 3
|
79
|
+
|
80
|
+
# High level of harm severity.
|
81
|
+
HARM_SEVERITY_HIGH = 4
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Harm categories that will block the content.
|
86
|
+
module HarmCategory
|
87
|
+
# The harm category is unspecified.
|
88
|
+
HARM_CATEGORY_UNSPECIFIED = 0
|
89
|
+
|
90
|
+
# The harm category is hate speech.
|
91
|
+
HARM_CATEGORY_HATE_SPEECH = 1
|
92
|
+
|
93
|
+
# The harm category is dangerous content.
|
94
|
+
HARM_CATEGORY_DANGEROUS_CONTENT = 2
|
95
|
+
|
96
|
+
# The harm category is harassment.
|
97
|
+
HARM_CATEGORY_HARASSMENT = 3
|
98
|
+
|
99
|
+
# The harm category is sexually explicit content.
|
100
|
+
HARM_CATEGORY_SEXUALLY_EXPLICIT = 4
|
101
|
+
|
102
|
+
# The harm category is civic integrity.
|
103
|
+
HARM_CATEGORY_CIVIC_INTEGRITY = 5
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -83,10 +83,13 @@ module Google
|
|
83
83
|
# Default number is 10.
|
84
84
|
# @!attribute [rw] data_store_specs
|
85
85
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>]
|
86
|
-
#
|
87
|
-
#
|
88
|
-
#
|
89
|
-
#
|
86
|
+
# Specifications that define the specific
|
87
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore}s to be searched,
|
88
|
+
# along with configurations for those data stores. This is only considered
|
89
|
+
# for {::Google::Cloud::DiscoveryEngine::V1::Engine Engine}s with multiple data
|
90
|
+
# stores. For engines with a single data store, the specs directly under
|
91
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest SearchRequest} should be
|
92
|
+
# used.
|
90
93
|
# @!attribute [rw] filter
|
91
94
|
# @return [::String]
|
92
95
|
# The filter syntax consists of an expression language for constructing a
|
@@ -135,7 +138,7 @@ module Google
|
|
135
138
|
# @!attribute [rw] user_info
|
136
139
|
# @return [::Google::Cloud::DiscoveryEngine::V1::UserInfo]
|
137
140
|
# Information about the end user.
|
138
|
-
# Highly recommended for analytics.
|
141
|
+
# Highly recommended for analytics and personalization.
|
139
142
|
# {::Google::Cloud::DiscoveryEngine::V1::UserInfo#user_agent UserInfo.user_agent}
|
140
143
|
# is used to deduce `device_type` for analytics.
|
141
144
|
# @!attribute [rw] language_code
|
@@ -228,6 +231,10 @@ module Google
|
|
228
231
|
# Search as you type configuration. Only supported for the
|
229
232
|
# {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA}
|
230
233
|
# vertical.
|
234
|
+
# @!attribute [rw] display_spec
|
235
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec]
|
236
|
+
# Optional. Config for display feature, like match highlighting on search
|
237
|
+
# results.
|
231
238
|
# @!attribute [rw] session
|
232
239
|
# @return [::String]
|
233
240
|
# The session resource name. Optional.
|
@@ -261,6 +268,18 @@ module Google
|
|
261
268
|
# Session specification.
|
262
269
|
#
|
263
270
|
# Can be used only when `session` is set.
|
271
|
+
# @!attribute [rw] relevance_threshold
|
272
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceThreshold]
|
273
|
+
# The relevance threshold of the search results.
|
274
|
+
#
|
275
|
+
# Default to Google defined threshold, leveraging a balance of
|
276
|
+
# precision and recall to deliver both highly accurate results and
|
277
|
+
# comprehensive coverage of relevant information.
|
278
|
+
#
|
279
|
+
# This feature is not supported for healthcare search.
|
280
|
+
# @!attribute [rw] relevance_score_spec
|
281
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::RelevanceScoreSpec]
|
282
|
+
# Optional. The specification for returning the relevance score.
|
264
283
|
class SearchRequest
|
265
284
|
include ::Google::Protobuf::MessageExts
|
266
285
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -288,6 +307,11 @@ module Google
|
|
288
307
|
# Optional. Filter specification to filter documents in the data store
|
289
308
|
# specified by data_store field. For more information on filtering, see
|
290
309
|
# [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
310
|
+
# @!attribute [rw] boost_spec
|
311
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec]
|
312
|
+
# Optional. Boost specification to boost certain documents.
|
313
|
+
# For more information on boosting, see
|
314
|
+
# [Boosting](https://cloud.google.com/generative-ai-app-builder/docs/boost-search-results)
|
291
315
|
class DataStoreSpec
|
292
316
|
include ::Google::Protobuf::MessageExts
|
293
317
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -437,7 +461,7 @@ module Google
|
|
437
461
|
# @!attribute [rw] condition_boost_specs
|
438
462
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec::ConditionBoostSpec>]
|
439
463
|
# Condition boost specifications. If a document matches multiple conditions
|
440
|
-
# in the
|
464
|
+
# in the specifications, boost scores from these specifications are all
|
441
465
|
# applied and combined in a non-linear way. Maximum number of
|
442
466
|
# specifications is 20.
|
443
467
|
class BoostSpec
|
@@ -900,7 +924,8 @@ module Google
|
|
900
924
|
DOCUMENTS = 1
|
901
925
|
|
902
926
|
# Returns chunks in the search result. Only available if the
|
903
|
-
#
|
927
|
+
# {::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig#chunking_config DocumentProcessingConfig.chunking_config}
|
928
|
+
# is specified.
|
904
929
|
CHUNKS = 2
|
905
930
|
end
|
906
931
|
end
|
@@ -926,6 +951,31 @@ module Google
|
|
926
951
|
|
927
952
|
# Enables Search As You Type.
|
928
953
|
ENABLED = 2
|
954
|
+
|
955
|
+
# Automatic switching between search-as-you-type and standard search
|
956
|
+
# modes, ideal for single-API implementations (e.g., debouncing).
|
957
|
+
AUTO = 3
|
958
|
+
end
|
959
|
+
end
|
960
|
+
|
961
|
+
# Specifies features for display, like match highlighting.
|
962
|
+
# @!attribute [rw] match_highlighting_condition
|
963
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DisplaySpec::MatchHighlightingCondition]
|
964
|
+
# The condition under which match highlighting should occur.
|
965
|
+
class DisplaySpec
|
966
|
+
include ::Google::Protobuf::MessageExts
|
967
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
968
|
+
|
969
|
+
# Enum describing under which condition match highlighting should occur.
|
970
|
+
module MatchHighlightingCondition
|
971
|
+
# Server behavior is the same as `MATCH_HIGHLIGHTING_DISABLED`.
|
972
|
+
MATCH_HIGHLIGHTING_CONDITION_UNSPECIFIED = 0
|
973
|
+
|
974
|
+
# Disables match highlighting on all documents.
|
975
|
+
MATCH_HIGHLIGHTING_DISABLED = 1
|
976
|
+
|
977
|
+
# Enables match highlighting on all documents.
|
978
|
+
MATCH_HIGHLIGHTING_ENABLED = 2
|
929
979
|
end
|
930
980
|
end
|
931
981
|
|
@@ -966,7 +1016,7 @@ module Google
|
|
966
1016
|
# The number of top search results to persist. The persisted search results
|
967
1017
|
# can be used for the subsequent /answer api call.
|
968
1018
|
#
|
969
|
-
# This field is
|
1019
|
+
# This field is similar to the `summary_result_count` field in
|
970
1020
|
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#summary_result_count SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count}.
|
971
1021
|
#
|
972
1022
|
# At most 10 results for documents mode, or 50 for chunks mode.
|
@@ -975,6 +1025,16 @@ module Google
|
|
975
1025
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
976
1026
|
end
|
977
1027
|
|
1028
|
+
# The specification for returning the document relevance score.
|
1029
|
+
# @!attribute [rw] return_relevance_score
|
1030
|
+
# @return [::Boolean]
|
1031
|
+
# Optional. Whether to return the relevance score for search results.
|
1032
|
+
# The higher the score, the more relevant the document is to the query.
|
1033
|
+
class RelevanceScoreSpec
|
1034
|
+
include ::Google::Protobuf::MessageExts
|
1035
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1036
|
+
end
|
1037
|
+
|
978
1038
|
# @!attribute [rw] key
|
979
1039
|
# @return [::String]
|
980
1040
|
# @!attribute [rw] value
|
@@ -992,6 +1052,27 @@ module Google
|
|
992
1052
|
include ::Google::Protobuf::MessageExts
|
993
1053
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
994
1054
|
end
|
1055
|
+
|
1056
|
+
# The relevance threshold of the search results. The higher relevance
|
1057
|
+
# threshold is, the higher relevant results are shown and the less number of
|
1058
|
+
# results are returned.
|
1059
|
+
module RelevanceThreshold
|
1060
|
+
# Default value. In this case, server behavior defaults to Google defined
|
1061
|
+
# threshold.
|
1062
|
+
RELEVANCE_THRESHOLD_UNSPECIFIED = 0
|
1063
|
+
|
1064
|
+
# Lowest relevance threshold.
|
1065
|
+
LOWEST = 1
|
1066
|
+
|
1067
|
+
# Low relevance threshold.
|
1068
|
+
LOW = 2
|
1069
|
+
|
1070
|
+
# Medium relevance threshold.
|
1071
|
+
MEDIUM = 3
|
1072
|
+
|
1073
|
+
# High relevance threshold.
|
1074
|
+
HIGH = 4
|
1075
|
+
end
|
995
1076
|
end
|
996
1077
|
|
997
1078
|
# Response message for
|
@@ -1052,6 +1133,9 @@ module Google
|
|
1052
1133
|
# Only set if
|
1053
1134
|
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session}
|
1054
1135
|
# is provided. See its description for more details.
|
1136
|
+
# @!attribute [rw] search_link_promotions
|
1137
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchLinkPromotion>]
|
1138
|
+
# Promotions for site search.
|
1055
1139
|
class SearchResponse
|
1056
1140
|
include ::Google::Protobuf::MessageExts
|
1057
1141
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -1071,9 +1155,21 @@ module Google
|
|
1071
1155
|
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
|
1072
1156
|
# is set to
|
1073
1157
|
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
|
1158
|
+
# @!attribute [r] model_scores
|
1159
|
+
# @return [::Google::Protobuf::Map{::String => ::Google::Cloud::DiscoveryEngine::V1::DoubleList}]
|
1160
|
+
# Output only. Google provided available scores.
|
1074
1161
|
class SearchResult
|
1075
1162
|
include ::Google::Protobuf::MessageExts
|
1076
1163
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1164
|
+
|
1165
|
+
# @!attribute [rw] key
|
1166
|
+
# @return [::String]
|
1167
|
+
# @!attribute [rw] value
|
1168
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::DoubleList]
|
1169
|
+
class ModelScoresEntry
|
1170
|
+
include ::Google::Protobuf::MessageExts
|
1171
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1172
|
+
end
|
1077
1173
|
end
|
1078
1174
|
|
1079
1175
|
# A facet result.
|
@@ -1294,6 +1390,11 @@ module Google
|
|
1294
1390
|
# [SearchRequest.ContentSearchSpec.SummarySpec.ignore_non_answer_seeking_query]
|
1295
1391
|
# is set to `true`.
|
1296
1392
|
NON_SUMMARY_SEEKING_QUERY_IGNORED_V2 = 9
|
1393
|
+
|
1394
|
+
# The time out case.
|
1395
|
+
#
|
1396
|
+
# Google skips the summary if the time out.
|
1397
|
+
TIME_OUT = 10
|
1297
1398
|
end
|
1298
1399
|
end
|
1299
1400
|
|