google-cloud-discovery_engine-v1 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +219 -0
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +205 -0
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/service_stub.rb +136 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +19 -1
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +19 -1
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +3 -1
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +42 -1
- data/lib/google/cloud/discovery_engine/v1/search_service/paths.rb +68 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +42 -1
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb +7 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/chunk_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/completion_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/completion_service_services_pb.rb +8 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +6 -1
- data/lib/google/cloud/discoveryengine/v1/purge_config_pb.rb +4 -1
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +9 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_pb.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +13 -0
- data/proto_docs/google/cloud/discoveryengine/v1/chunk.rb +119 -0
- data/proto_docs/google/cloud/discoveryengine/v1/completion.rb +31 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +44 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +43 -2
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +114 -0
- data/proto_docs/google/cloud/discoveryengine/v1/purge_config.rb +42 -0
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +209 -4
- metadata +4 -2
@@ -338,6 +338,41 @@ module Google
|
|
338
338
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
339
339
|
end
|
340
340
|
|
341
|
+
# AlloyDB source import data from.
|
342
|
+
# @!attribute [rw] project_id
|
343
|
+
# @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
|
346
|
+
# project ID from the parent request.
|
347
|
+
# @!attribute [rw] location_id
|
348
|
+
# @return [::String]
|
349
|
+
# Required. The AlloyDB location to copy the data from with a length limit of
|
350
|
+
# 256 characters.
|
351
|
+
# @!attribute [rw] cluster_id
|
352
|
+
# @return [::String]
|
353
|
+
# Required. The AlloyDB cluster to copy the data from with a length limit of
|
354
|
+
# 256 characters.
|
355
|
+
# @!attribute [rw] database_id
|
356
|
+
# @return [::String]
|
357
|
+
# Required. The AlloyDB database to copy the data from with a length limit of
|
358
|
+
# 256 characters.
|
359
|
+
# @!attribute [rw] table_id
|
360
|
+
# @return [::String]
|
361
|
+
# Required. The AlloyDB table to copy the data from with a length limit of
|
362
|
+
# 256 characters.
|
363
|
+
# @!attribute [rw] gcs_staging_dir
|
364
|
+
# @return [::String]
|
365
|
+
# Intermediate Cloud Storage directory used for the import with a length
|
366
|
+
# limit of 2,000 characters. Can be specified if one wants to have the
|
367
|
+
# AlloyDB export to a specific Cloud Storage directory.
|
368
|
+
#
|
369
|
+
# Ensure that the AlloyDB service account has the necessary Cloud
|
370
|
+
# Storage Admin permissions to access the specified Cloud Storage directory.
|
371
|
+
class AlloyDbSource
|
372
|
+
include ::Google::Protobuf::MessageExts
|
373
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
374
|
+
end
|
375
|
+
|
341
376
|
# Firestore source import data from.
|
342
377
|
# @!attribute [rw] project_id
|
343
378
|
# @return [::String]
|
@@ -496,6 +531,9 @@ module Google
|
|
496
531
|
# @!attribute [rw] firestore_source
|
497
532
|
# @return [::Google::Cloud::DiscoveryEngine::V1::FirestoreSource]
|
498
533
|
# Firestore input source.
|
534
|
+
# @!attribute [rw] alloy_db_source
|
535
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AlloyDbSource]
|
536
|
+
# AlloyDB input source.
|
499
537
|
# @!attribute [rw] bigtable_source
|
500
538
|
# @return [::Google::Cloud::DiscoveryEngine::V1::BigtableSource]
|
501
539
|
# Cloud Bigtable input source.
|
@@ -689,6 +727,82 @@ module Google
|
|
689
727
|
include ::Google::Protobuf::MessageExts
|
690
728
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
691
729
|
end
|
730
|
+
|
731
|
+
# Request message for
|
732
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#import_completion_suggestions CompletionService.ImportCompletionSuggestions}
|
733
|
+
# method.
|
734
|
+
# @!attribute [rw] inline_source
|
735
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::ImportCompletionSuggestionsRequest::InlineSource]
|
736
|
+
# The Inline source for suggestion entries.
|
737
|
+
# @!attribute [rw] gcs_source
|
738
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::GcsSource]
|
739
|
+
# Cloud Storage location for the input content.
|
740
|
+
# @!attribute [rw] bigquery_source
|
741
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::BigQuerySource]
|
742
|
+
# BigQuery input source.
|
743
|
+
# @!attribute [rw] parent
|
744
|
+
# @return [::String]
|
745
|
+
# Required. The parent data store resource name for which to import customer
|
746
|
+
# autocomplete suggestions.
|
747
|
+
#
|
748
|
+
# Follows pattern `projects/*/locations/*/collections/*/dataStores/*`
|
749
|
+
# @!attribute [rw] error_config
|
750
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig]
|
751
|
+
# The desired location of errors incurred during the Import.
|
752
|
+
class ImportCompletionSuggestionsRequest
|
753
|
+
include ::Google::Protobuf::MessageExts
|
754
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
755
|
+
|
756
|
+
# The inline source for CompletionSuggestions.
|
757
|
+
# @!attribute [rw] suggestions
|
758
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::CompletionSuggestion>]
|
759
|
+
# Required. A list of all denylist entries to import. Max of 1000 items.
|
760
|
+
class InlineSource
|
761
|
+
include ::Google::Protobuf::MessageExts
|
762
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
763
|
+
end
|
764
|
+
end
|
765
|
+
|
766
|
+
# Response of the
|
767
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#import_completion_suggestions CompletionService.ImportCompletionSuggestions}
|
768
|
+
# method. If the long running operation is done, this message is returned by
|
769
|
+
# the google.longrunning.Operations.response field if the operation is
|
770
|
+
# successful.
|
771
|
+
# @!attribute [rw] error_samples
|
772
|
+
# @return [::Array<::Google::Rpc::Status>]
|
773
|
+
# A sample of errors encountered while processing the request.
|
774
|
+
# @!attribute [rw] error_config
|
775
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::ImportErrorConfig]
|
776
|
+
# The desired location of errors incurred during the Import.
|
777
|
+
class ImportCompletionSuggestionsResponse
|
778
|
+
include ::Google::Protobuf::MessageExts
|
779
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
780
|
+
end
|
781
|
+
|
782
|
+
# Metadata related to the progress of the ImportCompletionSuggestions
|
783
|
+
# operation. This will be returned by the google.longrunning.Operation.metadata
|
784
|
+
# field.
|
785
|
+
# @!attribute [rw] create_time
|
786
|
+
# @return [::Google::Protobuf::Timestamp]
|
787
|
+
# Operation create time.
|
788
|
+
# @!attribute [rw] update_time
|
789
|
+
# @return [::Google::Protobuf::Timestamp]
|
790
|
+
# Operation last update time. If the operation is done, this is also the
|
791
|
+
# finish time.
|
792
|
+
# @!attribute [rw] success_count
|
793
|
+
# @return [::Integer]
|
794
|
+
# Count of
|
795
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionSuggestion CompletionSuggestion}s
|
796
|
+
# successfully imported.
|
797
|
+
# @!attribute [rw] failure_count
|
798
|
+
# @return [::Integer]
|
799
|
+
# Count of
|
800
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionSuggestion CompletionSuggestion}s
|
801
|
+
# that failed to be imported.
|
802
|
+
class ImportCompletionSuggestionsMetadata
|
803
|
+
include ::Google::Protobuf::MessageExts
|
804
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
805
|
+
end
|
692
806
|
end
|
693
807
|
end
|
694
808
|
end
|
@@ -122,6 +122,48 @@ module Google
|
|
122
122
|
include ::Google::Protobuf::MessageExts
|
123
123
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
124
124
|
end
|
125
|
+
|
126
|
+
# Request message for
|
127
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#purge_completion_suggestions CompletionService.PurgeCompletionSuggestions}
|
128
|
+
# method.
|
129
|
+
# @!attribute [rw] parent
|
130
|
+
# @return [::String]
|
131
|
+
# Required. The parent data store resource name for which to purge completion
|
132
|
+
# suggestions. Follows pattern
|
133
|
+
# projects/*/locations/*/collections/*/dataStores/*.
|
134
|
+
class PurgeCompletionSuggestionsRequest
|
135
|
+
include ::Google::Protobuf::MessageExts
|
136
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
137
|
+
end
|
138
|
+
|
139
|
+
# Response message for
|
140
|
+
# {::Google::Cloud::DiscoveryEngine::V1::CompletionService::Client#purge_completion_suggestions CompletionService.PurgeCompletionSuggestions}
|
141
|
+
# method.
|
142
|
+
# @!attribute [rw] purge_succeeded
|
143
|
+
# @return [::Boolean]
|
144
|
+
# Whether the completion suggestions were successfully purged.
|
145
|
+
# @!attribute [rw] error_samples
|
146
|
+
# @return [::Array<::Google::Rpc::Status>]
|
147
|
+
# A sample of errors encountered while processing the request.
|
148
|
+
class PurgeCompletionSuggestionsResponse
|
149
|
+
include ::Google::Protobuf::MessageExts
|
150
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
151
|
+
end
|
152
|
+
|
153
|
+
# Metadata related to the progress of the PurgeCompletionSuggestions
|
154
|
+
# operation. This is returned by the google.longrunning.Operation.metadata
|
155
|
+
# field.
|
156
|
+
# @!attribute [rw] create_time
|
157
|
+
# @return [::Google::Protobuf::Timestamp]
|
158
|
+
# Operation create time.
|
159
|
+
# @!attribute [rw] update_time
|
160
|
+
# @return [::Google::Protobuf::Timestamp]
|
161
|
+
# Operation last update time. If the operation is done, this is also the
|
162
|
+
# finish time.
|
163
|
+
class PurgeCompletionSuggestionsMetadata
|
164
|
+
include ::Google::Protobuf::MessageExts
|
165
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
166
|
+
end
|
125
167
|
end
|
126
168
|
end
|
127
169
|
end
|
@@ -130,6 +130,13 @@ module Google
|
|
130
130
|
# Highly recommended for analytics.
|
131
131
|
# {::Google::Cloud::DiscoveryEngine::V1::UserInfo#user_agent UserInfo.user_agent}
|
132
132
|
# is used to deduce `device_type` for analytics.
|
133
|
+
# @!attribute [rw] language_code
|
134
|
+
# @return [::String]
|
135
|
+
# The BCP-47 language code, such as "en-US" or "sr-Latn". For more
|
136
|
+
# information, see [Standard
|
137
|
+
# fields](https://cloud.google.com/apis/design/standard_fields). This field
|
138
|
+
# helps to better interpret the query. If a value isn't specified, the query
|
139
|
+
# language code is automatically detected, which may not be accurate.
|
133
140
|
# @!attribute [rw] facet_specs
|
134
141
|
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::FacetSpec>]
|
135
142
|
# Facet specifications for faceted search. If empty, no facets are returned.
|
@@ -208,6 +215,44 @@ module Google
|
|
208
215
|
# See [Google Cloud
|
209
216
|
# Document](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements)
|
210
217
|
# for more details.
|
218
|
+
# @!attribute [rw] search_as_you_type_spec
|
219
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec]
|
220
|
+
# Search as you type configuration. Only supported for the
|
221
|
+
# {::Google::Cloud::DiscoveryEngine::V1::IndustryVertical::MEDIA IndustryVertical.MEDIA}
|
222
|
+
# vertical.
|
223
|
+
# @!attribute [rw] session
|
224
|
+
# @return [::String]
|
225
|
+
# The session resource name. Optional.
|
226
|
+
#
|
227
|
+
# Session allows users to do multi-turn /search API calls or coordination
|
228
|
+
# between /search API calls and /answer API calls.
|
229
|
+
#
|
230
|
+
# Example #1 (multi-turn /search API calls):
|
231
|
+
# 1. Call /search API with the auto-session mode (see below).
|
232
|
+
# 2. Call /search API with the session ID generated in the first call.
|
233
|
+
# Here, the previous search query gets considered in query
|
234
|
+
# standing. I.e., if the first query is "How did Alphabet do in 2022?"
|
235
|
+
# and the current query is "How about 2023?", the current query will
|
236
|
+
# be interpreted as "How did Alphabet do in 2023?".
|
237
|
+
#
|
238
|
+
# Example #2 (coordination between /search API calls and /answer API calls):
|
239
|
+
# 1. Call /search API with the auto-session mode (see below).
|
240
|
+
# 2. Call /answer API with the session ID generated in the first call.
|
241
|
+
# Here, the answer generation happens in the context of the search
|
242
|
+
# results from the first search call.
|
243
|
+
#
|
244
|
+
# Auto-session mode: when `projects/.../sessions/-` is used, a new session
|
245
|
+
# gets automatically created. Otherwise, users can use the create-session API
|
246
|
+
# to create a session manually.
|
247
|
+
#
|
248
|
+
# Multi-turn Search feature is currently at private GA stage. Please use
|
249
|
+
# v1alpha or v1beta version instead before we launch this feature to public
|
250
|
+
# GA. Or ask for allowlisting through Google Support team.
|
251
|
+
# @!attribute [rw] session_spec
|
252
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SessionSpec]
|
253
|
+
# Session specification.
|
254
|
+
#
|
255
|
+
# Can be used only when `session` is set.
|
211
256
|
class SearchRequest
|
212
257
|
include ::Google::Protobuf::MessageExts
|
213
258
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -223,8 +268,8 @@ module Google
|
|
223
268
|
end
|
224
269
|
|
225
270
|
# A struct to define data stores to filter on in a search call and
|
226
|
-
# configurations for those data stores.
|
227
|
-
#
|
271
|
+
# configurations for those data stores. Otherwise, an `INVALID_ARGUMENT`
|
272
|
+
# error is returned.
|
228
273
|
# @!attribute [rw] data_store
|
229
274
|
# @return [::String]
|
230
275
|
# Required. Full resource name of
|
@@ -244,6 +289,9 @@ module Google
|
|
244
289
|
# Maximum facet values that are returned for this facet. If
|
245
290
|
# unspecified, defaults to 20. The maximum allowed value is 300. Values
|
246
291
|
# above 300 are coerced to 300.
|
292
|
+
# For aggregation in healthcare search, when the [FacetKey.key] is
|
293
|
+
# "healthcare_aggregation_key", the limit will be overridden to
|
294
|
+
# 10,000 internally, regardless of the value set here.
|
247
295
|
#
|
248
296
|
# If this field is negative, an `INVALID_ARGUMENT` is returned.
|
249
297
|
# @!attribute [rw] excluded_filter_keys
|
@@ -497,6 +545,21 @@ module Google
|
|
497
545
|
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::ExtractiveContentSpec]
|
498
546
|
# If there is no extractive_content_spec provided, there will be no
|
499
547
|
# extractive answer in the search response.
|
548
|
+
# @!attribute [rw] search_result_mode
|
549
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode]
|
550
|
+
# 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`.
|
556
|
+
# @!attribute [rw] chunk_spec
|
557
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::ChunkSpec]
|
558
|
+
# Specifies the chunk spec to be returned from the search response.
|
559
|
+
# Only available if the
|
560
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
|
561
|
+
# is set to
|
562
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}
|
500
563
|
class ContentSearchSpec
|
501
564
|
include ::Google::Protobuf::MessageExts
|
502
565
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -533,8 +596,9 @@ module Google
|
|
533
596
|
#
|
534
597
|
# At most 10 results for documents mode, or 50 for chunks mode, can be
|
535
598
|
# used to generate a summary. The chunks mode is used when
|
536
|
-
#
|
537
|
-
#
|
599
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
|
600
|
+
# is set to
|
601
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
|
538
602
|
# @!attribute [rw] include_citations
|
539
603
|
# @return [::Boolean]
|
540
604
|
# Specifies whether to include citations in the summary. The default
|
@@ -691,6 +755,114 @@ module Google
|
|
691
755
|
include ::Google::Protobuf::MessageExts
|
692
756
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
693
757
|
end
|
758
|
+
|
759
|
+
# Specifies the chunk spec to be returned from the search response.
|
760
|
+
# Only available if the
|
761
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
|
762
|
+
# is set to
|
763
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}
|
764
|
+
# @!attribute [rw] num_previous_chunks
|
765
|
+
# @return [::Integer]
|
766
|
+
# The number of previous chunks to be returned of the current chunk. The
|
767
|
+
# maximum allowed value is 3.
|
768
|
+
# If not specified, no previous chunks will be returned.
|
769
|
+
# @!attribute [rw] num_next_chunks
|
770
|
+
# @return [::Integer]
|
771
|
+
# The number of next chunks to be returned of the current chunk. The
|
772
|
+
# maximum allowed value is 3.
|
773
|
+
# If not specified, no next chunks will be returned.
|
774
|
+
class ChunkSpec
|
775
|
+
include ::Google::Protobuf::MessageExts
|
776
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
777
|
+
end
|
778
|
+
|
779
|
+
# 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`.
|
785
|
+
module SearchResultMode
|
786
|
+
# Default value.
|
787
|
+
SEARCH_RESULT_MODE_UNSPECIFIED = 0
|
788
|
+
|
789
|
+
# Returns documents in the search result.
|
790
|
+
DOCUMENTS = 1
|
791
|
+
|
792
|
+
# Returns chunks in the search result. Only available if the
|
793
|
+
# [DataStore.DocumentProcessingConfig.chunking_config][] is specified.
|
794
|
+
CHUNKS = 2
|
795
|
+
end
|
796
|
+
end
|
797
|
+
|
798
|
+
# Specification for search as you type in search requests.
|
799
|
+
# @!attribute [rw] condition
|
800
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec::Condition]
|
801
|
+
# The condition under which search as you type should occur.
|
802
|
+
# Default to
|
803
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec::Condition::DISABLED Condition.DISABLED}.
|
804
|
+
class SearchAsYouTypeSpec
|
805
|
+
include ::Google::Protobuf::MessageExts
|
806
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
807
|
+
|
808
|
+
# Enum describing under which condition search as you type should occur.
|
809
|
+
module Condition
|
810
|
+
# Server behavior defaults to
|
811
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::SearchAsYouTypeSpec::Condition::DISABLED Condition.DISABLED}.
|
812
|
+
CONDITION_UNSPECIFIED = 0
|
813
|
+
|
814
|
+
# Disables Search As You Type.
|
815
|
+
DISABLED = 1
|
816
|
+
|
817
|
+
# Enables Search As You Type.
|
818
|
+
ENABLED = 2
|
819
|
+
end
|
820
|
+
end
|
821
|
+
|
822
|
+
# Session specification.
|
823
|
+
#
|
824
|
+
# Multi-turn Search feature is currently at private GA stage. Please use
|
825
|
+
# v1alpha or v1beta version instead before we launch this feature to public
|
826
|
+
# GA. Or ask for allowlisting through Google Support team.
|
827
|
+
# @!attribute [rw] query_id
|
828
|
+
# @return [::String]
|
829
|
+
# If set, the search result gets stored to the "turn" specified by this
|
830
|
+
# query ID.
|
831
|
+
#
|
832
|
+
# Example: Let's say the session looks like this:
|
833
|
+
# session {
|
834
|
+
# name: ".../sessions/xxx"
|
835
|
+
# turns {
|
836
|
+
# query { text: "What is foo?" query_id: ".../questions/yyy" }
|
837
|
+
# answer: "Foo is ..."
|
838
|
+
# }
|
839
|
+
# turns {
|
840
|
+
# query { text: "How about bar then?" query_id: ".../questions/zzz" }
|
841
|
+
# }
|
842
|
+
# }
|
843
|
+
#
|
844
|
+
# The user can call /search API with a request like this:
|
845
|
+
#
|
846
|
+
# session: ".../sessions/xxx"
|
847
|
+
# session_spec { query_id: ".../questions/zzz" }
|
848
|
+
#
|
849
|
+
# Then, the API stores the search result, associated with the last turn.
|
850
|
+
# The stored search result can be used by a subsequent /answer API call
|
851
|
+
# (with the session ID and the query ID specified). Also, it is possible
|
852
|
+
# to call /search and /answer in parallel with the same session ID & query
|
853
|
+
# ID.
|
854
|
+
# @!attribute [rw] search_result_persistence_count
|
855
|
+
# @return [::Integer]
|
856
|
+
# The number of top search results to persist. The persisted search results
|
857
|
+
# can be used for the subsequent /answer api call.
|
858
|
+
#
|
859
|
+
# This field is simliar to the `summary_result_count` field in
|
860
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SummarySpec#summary_result_count SearchRequest.ContentSearchSpec.SummarySpec.summary_result_count}.
|
861
|
+
#
|
862
|
+
# At most 10 results for documents mode, or 50 for chunks mode.
|
863
|
+
class SessionSpec
|
864
|
+
include ::Google::Protobuf::MessageExts
|
865
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
694
866
|
end
|
695
867
|
|
696
868
|
# @!attribute [rw] key
|
@@ -762,6 +934,13 @@ module Google
|
|
762
934
|
# @!attribute [rw] query_expansion_info
|
763
935
|
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::QueryExpansionInfo]
|
764
936
|
# Query expansion information for the returned results.
|
937
|
+
# @!attribute [rw] session_info
|
938
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchResponse::SessionInfo]
|
939
|
+
# Session information.
|
940
|
+
#
|
941
|
+
# Only set if
|
942
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session}
|
943
|
+
# is provided. See its description for more details.
|
765
944
|
class SearchResponse
|
766
945
|
include ::Google::Protobuf::MessageExts
|
767
946
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -775,6 +954,12 @@ module Google
|
|
775
954
|
# @return [::Google::Cloud::DiscoveryEngine::V1::Document]
|
776
955
|
# The document data snippet in the search response. Only fields that are
|
777
956
|
# marked as `retrievable` are populated.
|
957
|
+
# @!attribute [rw] chunk
|
958
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Chunk]
|
959
|
+
# The chunk data in the search response if the
|
960
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec#search_result_mode SearchRequest.ContentSearchSpec.search_result_mode}
|
961
|
+
# is set to
|
962
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest::ContentSearchSpec::SearchResultMode::CHUNKS CHUNKS}.
|
778
963
|
class SearchResult
|
779
964
|
include ::Google::Protobuf::MessageExts
|
780
965
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
@@ -983,6 +1168,26 @@ module Google
|
|
983
1168
|
include ::Google::Protobuf::MessageExts
|
984
1169
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
985
1170
|
end
|
1171
|
+
|
1172
|
+
# Information about the session.
|
1173
|
+
# @!attribute [rw] name
|
1174
|
+
# @return [::String]
|
1175
|
+
# Name of the session.
|
1176
|
+
# If the auto-session mode is used (when
|
1177
|
+
# {::Google::Cloud::DiscoveryEngine::V1::SearchRequest#session SearchRequest.session}
|
1178
|
+
# ends with "-"), this field holds the newly generated session name.
|
1179
|
+
# @!attribute [rw] query_id
|
1180
|
+
# @return [::String]
|
1181
|
+
# Query ID that corresponds to this search API call.
|
1182
|
+
# One session can have multiple turns, each with a unique query ID.
|
1183
|
+
#
|
1184
|
+
# By specifying the session name and this query ID in the Answer API call,
|
1185
|
+
# the answer generation happens in the context of the search results from
|
1186
|
+
# this search call.
|
1187
|
+
class SessionInfo
|
1188
|
+
include ::Google::Protobuf::MessageExts
|
1189
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
1190
|
+
end
|
986
1191
|
end
|
987
1192
|
end
|
988
1193
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-cloud-discovery_engine-v1
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Google LLC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gapic-common
|
@@ -195,6 +195,7 @@ files:
|
|
195
195
|
- lib/google/cloud/discovery_engine/v1/user_event_service/rest/service_stub.rb
|
196
196
|
- lib/google/cloud/discovery_engine/v1/version.rb
|
197
197
|
- lib/google/cloud/discoveryengine/v1/answer_pb.rb
|
198
|
+
- lib/google/cloud/discoveryengine/v1/chunk_pb.rb
|
198
199
|
- lib/google/cloud/discoveryengine/v1/common_pb.rb
|
199
200
|
- lib/google/cloud/discoveryengine/v1/completion_pb.rb
|
200
201
|
- lib/google/cloud/discoveryengine/v1/completion_service_pb.rb
|
@@ -246,6 +247,7 @@ files:
|
|
246
247
|
- proto_docs/google/api/launch_stage.rb
|
247
248
|
- proto_docs/google/api/resource.rb
|
248
249
|
- proto_docs/google/cloud/discoveryengine/v1/answer.rb
|
250
|
+
- proto_docs/google/cloud/discoveryengine/v1/chunk.rb
|
249
251
|
- proto_docs/google/cloud/discoveryengine/v1/common.rb
|
250
252
|
- proto_docs/google/cloud/discoveryengine/v1/completion.rb
|
251
253
|
- proto_docs/google/cloud/discoveryengine/v1/completion_service.rb
|