google-cloud-discovery_engine-v1 0.7.0 → 0.8.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 +9 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +9 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/control_service/client.rb +875 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/paths.rb +167 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/client.rb +814 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest/service_stub.rb +440 -0
- data/lib/google/cloud/discovery_engine/v1/control_service/rest.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/control_service.rb +58 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +764 -6
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +199 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +715 -6
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +520 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/data_store_service/paths.rb +45 -0
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/client.rb +15 -7
- data/lib/google/cloud/discovery_engine/v1/data_store_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +23 -13
- data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -13
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/client.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/client.rb +471 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/client.rb +438 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/grounded_generation_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/client.rb +485 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/operations.rb +809 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/paths.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/client.rb +452 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/operations.rb +1114 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/project_service/rest.rb +54 -0
- data/lib/google/cloud/discovery_engine/v1/project_service.rb +57 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/client.rb +481 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/paths.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/client.rb +448 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest/service_stub.rb +129 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/rank_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/paths.rb +66 -0
- data/lib/google/cloud/discovery_engine/v1/recommendation_service/rest/client.rb +24 -19
- data/lib/google/cloud/discovery_engine/v1/rest.rb +4 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +18 -10
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +15 -8
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +15 -8
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/client.rb +27 -12
- data/lib/google/cloud/discovery_engine/v1/site_search_engine_service/rest/operations.rb +28 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +13 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/paths.rb +21 -0
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +23 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +28 -5
- 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 +4 -0
- data/lib/google/cloud/discoveryengine/v1/answer_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/control_pb.rb +55 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_pb.rb +57 -0
- data/lib/google/cloud/discoveryengine/v1/control_service_services_pb.rb +69 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +32 -1
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +25 -0
- data/lib/google/cloud/discoveryengine/v1/data_store_pb.rb +3 -1
- data/lib/google/cloud/discoveryengine/v1/document_processing_config_pb.rb +48 -0
- data/lib/google/cloud/discoveryengine/v1/document_service_services_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 +52 -0
- data/lib/google/cloud/discoveryengine/v1/grounded_generation_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/grounding_pb.rb +46 -0
- data/lib/google/cloud/discoveryengine/v1/project_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/project_service_services_pb.rb +51 -0
- data/lib/google/cloud/discoveryengine/v1/rank_service_pb.rb +49 -0
- data/lib/google/cloud/discoveryengine/v1/rank_service_services_pb.rb +45 -0
- data/lib/google/cloud/discoveryengine/v1/session_pb.rb +50 -0
- data/lib/google/cloud/discoveryengine/v1/site_search_engine_pb.rb +1 -1
- 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/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/cloud/discoveryengine/v1/answer.rb +362 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +16 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control.rb +207 -0
- data/proto_docs/google/cloud/discoveryengine/v1/control_service.rb +126 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +485 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/data_store_service.rb +2 -2
- data/proto_docs/google/cloud/discoveryengine/v1/document_processing_config.rb +102 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/engine.rb +3 -3
- data/proto_docs/google/cloud/discoveryengine/v1/grounded_generation_service.rb +144 -0
- data/proto_docs/google/cloud/discoveryengine/v1/grounding.rb +79 -0
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +4 -4
- data/proto_docs/google/cloud/discoveryengine/v1/project.rb +106 -0
- data/proto_docs/google/cloud/discoveryengine/v1/project_service.rb +57 -0
- data/proto_docs/google/cloud/discoveryengine/v1/rank_service.rb +124 -0
- data/proto_docs/google/cloud/discoveryengine/v1/recommendation_service.rb +20 -19
- data/proto_docs/google/cloud/discoveryengine/v1/schema_service.rb +5 -5
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +23 -18
- data/proto_docs/google/cloud/discoveryengine/v1/session.rb +88 -0
- data/proto_docs/google/cloud/discoveryengine/v1/site_search_engine.rb +3 -0
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +24 -3
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +13 -1
- metadata +56 -2
@@ -0,0 +1,126 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Copyright 2024 Google LLC
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# https://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
18
|
+
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Cloud
|
22
|
+
module DiscoveryEngine
|
23
|
+
module V1
|
24
|
+
# Request for CreateControl method.
|
25
|
+
# @!attribute [rw] parent
|
26
|
+
# @return [::String]
|
27
|
+
# Required. Full resource name of parent data store. Format:
|
28
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
|
29
|
+
# or
|
30
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
|
31
|
+
# @!attribute [rw] control
|
32
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Control]
|
33
|
+
# Required. The Control to create.
|
34
|
+
# @!attribute [rw] control_id
|
35
|
+
# @return [::String]
|
36
|
+
# Required. The ID to use for the Control, which will become the final
|
37
|
+
# component of the Control's resource name.
|
38
|
+
#
|
39
|
+
# This value must be within 1-63 characters.
|
40
|
+
# Valid characters are /[a-z][0-9]-_/.
|
41
|
+
class CreateControlRequest
|
42
|
+
include ::Google::Protobuf::MessageExts
|
43
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
44
|
+
end
|
45
|
+
|
46
|
+
# Request for UpdateControl method.
|
47
|
+
# @!attribute [rw] control
|
48
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Control]
|
49
|
+
# Required. The Control to update.
|
50
|
+
# @!attribute [rw] update_mask
|
51
|
+
# @return [::Google::Protobuf::FieldMask]
|
52
|
+
# Optional. Indicates which fields in the provided
|
53
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Control Control} to update. The following
|
54
|
+
# are NOT supported:
|
55
|
+
#
|
56
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::Control#name Control.name}
|
57
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::Control#solution_type Control.solution_type}
|
58
|
+
#
|
59
|
+
# If not set or empty, all supported fields are updated.
|
60
|
+
class UpdateControlRequest
|
61
|
+
include ::Google::Protobuf::MessageExts
|
62
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
63
|
+
end
|
64
|
+
|
65
|
+
# Request for DeleteControl method.
|
66
|
+
# @!attribute [rw] name
|
67
|
+
# @return [::String]
|
68
|
+
# Required. The resource name of the Control to delete. Format:
|
69
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`
|
70
|
+
class DeleteControlRequest
|
71
|
+
include ::Google::Protobuf::MessageExts
|
72
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
73
|
+
end
|
74
|
+
|
75
|
+
# Request for GetControl method.
|
76
|
+
# @!attribute [rw] name
|
77
|
+
# @return [::String]
|
78
|
+
# Required. The resource name of the Control to get. Format:
|
79
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}/controls/{control_id}`
|
80
|
+
class GetControlRequest
|
81
|
+
include ::Google::Protobuf::MessageExts
|
82
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
83
|
+
end
|
84
|
+
|
85
|
+
# Request for ListControls method.
|
86
|
+
# @!attribute [rw] parent
|
87
|
+
# @return [::String]
|
88
|
+
# Required. The data store resource name. Format:
|
89
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection_id}/dataStores/{data_store_id}`
|
90
|
+
# or
|
91
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection_id}/engines/{engine_id}`.
|
92
|
+
# @!attribute [rw] page_size
|
93
|
+
# @return [::Integer]
|
94
|
+
# Optional. Maximum number of results to return. If unspecified, defaults
|
95
|
+
# to 50. Max allowed value is 1000.
|
96
|
+
# @!attribute [rw] page_token
|
97
|
+
# @return [::String]
|
98
|
+
# Optional. A page token, received from a previous `ListControls` call.
|
99
|
+
# Provide this to retrieve the subsequent page.
|
100
|
+
# @!attribute [rw] filter
|
101
|
+
# @return [::String]
|
102
|
+
# Optional. A filter to apply on the list results. Supported features:
|
103
|
+
#
|
104
|
+
# * List all the products under the parent branch if
|
105
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ListControlsRequest#filter filter} is
|
106
|
+
# unset. Currently this field is unsupported.
|
107
|
+
class ListControlsRequest
|
108
|
+
include ::Google::Protobuf::MessageExts
|
109
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
110
|
+
end
|
111
|
+
|
112
|
+
# Response for ListControls method.
|
113
|
+
# @!attribute [rw] controls
|
114
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Control>]
|
115
|
+
# All the Controls for a given data store.
|
116
|
+
# @!attribute [rw] next_page_token
|
117
|
+
# @return [::String]
|
118
|
+
# Pagination token, if not returned indicates the last page.
|
119
|
+
class ListControlsResponse
|
120
|
+
include ::Google::Protobuf::MessageExts
|
121
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
122
|
+
end
|
123
|
+
end
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
@@ -25,9 +25,9 @@ module Google
|
|
25
25
|
# @!attribute [rw] name
|
26
26
|
# @return [::String]
|
27
27
|
# Immutable. Fully qualified name
|
28
|
-
# `project
|
28
|
+
# `projects/{project}/locations/global/collections/{collection}/dataStore/*/conversations/*`
|
29
29
|
# or
|
30
|
-
# `project
|
30
|
+
# `projects/{project}/locations/global/collections/{collection}/engines/*/conversations/*`.
|
31
31
|
# @!attribute [rw] state
|
32
32
|
# @return [::Google::Cloud::DiscoveryEngine::V1::Conversation::State]
|
33
33
|
# The state of the Conversation.
|
@@ -223,6 +223,491 @@ module Google
|
|
223
223
|
include ::Google::Protobuf::MessageExts
|
224
224
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|
225
225
|
end
|
226
|
+
|
227
|
+
# Request message for
|
228
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#answer_query ConversationalSearchService.AnswerQuery}
|
229
|
+
# method.
|
230
|
+
# @!attribute [rw] serving_config
|
231
|
+
# @return [::String]
|
232
|
+
# Required. The resource name of the Search serving config, such as
|
233
|
+
# `projects/*/locations/global/collections/default_collection/engines/*/servingConfigs/default_serving_config`,
|
234
|
+
# or
|
235
|
+
# `projects/*/locations/global/collections/default_collection/dataStores/*/servingConfigs/default_serving_config`.
|
236
|
+
# This field is used to identify the serving configuration name, set
|
237
|
+
# of models used to make the search.
|
238
|
+
# @!attribute [rw] query
|
239
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Query]
|
240
|
+
# Required. Current user query.
|
241
|
+
# @!attribute [rw] session
|
242
|
+
# @return [::String]
|
243
|
+
# The session resource name. Not required.
|
244
|
+
#
|
245
|
+
# When session field is not set, the API is in sessionless mode.
|
246
|
+
#
|
247
|
+
# We support auto session mode: users can use the wildcard symbol `-` as
|
248
|
+
# session ID. A new ID will be automatically generated and assigned.
|
249
|
+
# @!attribute [rw] safety_spec
|
250
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SafetySpec]
|
251
|
+
# Model specification.
|
252
|
+
# @!attribute [rw] related_questions_spec
|
253
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::RelatedQuestionsSpec]
|
254
|
+
# Related questions specification.
|
255
|
+
# @!attribute [rw] answer_generation_spec
|
256
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec]
|
257
|
+
# Answer generation specification.
|
258
|
+
# @!attribute [rw] search_spec
|
259
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec]
|
260
|
+
# Search specification.
|
261
|
+
# @!attribute [rw] query_understanding_spec
|
262
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec]
|
263
|
+
# Query understanding specification.
|
264
|
+
# @!attribute [rw] asynchronous_mode
|
265
|
+
# @return [::Boolean]
|
266
|
+
# Asynchronous mode control.
|
267
|
+
#
|
268
|
+
# If enabled, the response will be returned with answer/session resource
|
269
|
+
# name without final answer. The API users need to do the polling to get
|
270
|
+
# the latest status of answer/session by calling
|
271
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#get_answer ConversationalSearchService.GetAnswer}
|
272
|
+
# or
|
273
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#get_session ConversationalSearchService.GetSession}
|
274
|
+
# method.
|
275
|
+
# @!attribute [rw] user_pseudo_id
|
276
|
+
# @return [::String]
|
277
|
+
# A unique identifier for tracking visitors. For example, this could be
|
278
|
+
# implemented with an HTTP cookie, which should be able to uniquely identify
|
279
|
+
# a visitor on a single device. This unique identifier should not change if
|
280
|
+
# the visitor logs in or out of the website.
|
281
|
+
#
|
282
|
+
# This field should NOT have a fixed value such as `unknown_visitor`.
|
283
|
+
#
|
284
|
+
# The field must be a UTF-8 encoded string with a length limit of 128
|
285
|
+
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
286
|
+
class AnswerQueryRequest
|
287
|
+
include ::Google::Protobuf::MessageExts
|
288
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
289
|
+
|
290
|
+
# Safety specification.
|
291
|
+
# @!attribute [rw] enable
|
292
|
+
# @return [::Boolean]
|
293
|
+
# Enable the safety filtering on the answer response. It is false by
|
294
|
+
# default.
|
295
|
+
class SafetySpec
|
296
|
+
include ::Google::Protobuf::MessageExts
|
297
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
298
|
+
end
|
299
|
+
|
300
|
+
# Related questions specification.
|
301
|
+
# @!attribute [rw] enable
|
302
|
+
# @return [::Boolean]
|
303
|
+
# Enable related questions feature if true.
|
304
|
+
class RelatedQuestionsSpec
|
305
|
+
include ::Google::Protobuf::MessageExts
|
306
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
307
|
+
end
|
308
|
+
|
309
|
+
# Answer generation specification.
|
310
|
+
# @!attribute [rw] model_spec
|
311
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::ModelSpec]
|
312
|
+
# Answer generation model specification.
|
313
|
+
# @!attribute [rw] prompt_spec
|
314
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::AnswerGenerationSpec::PromptSpec]
|
315
|
+
# Answer generation prompt specification.
|
316
|
+
# @!attribute [rw] include_citations
|
317
|
+
# @return [::Boolean]
|
318
|
+
# Specifies whether to include citation metadata in the answer. The default
|
319
|
+
# value is `false`.
|
320
|
+
# @!attribute [rw] answer_language_code
|
321
|
+
# @return [::String]
|
322
|
+
# Language code for Answer. Use language tags defined by
|
323
|
+
# [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt).
|
324
|
+
# Note: This is an experimental feature.
|
325
|
+
# @!attribute [rw] ignore_adversarial_query
|
326
|
+
# @return [::Boolean]
|
327
|
+
# Specifies whether to filter out adversarial queries. The default value
|
328
|
+
# is `false`.
|
329
|
+
#
|
330
|
+
# Google employs search-query classification to detect adversarial
|
331
|
+
# queries. No answer is returned if the search query is classified as an
|
332
|
+
# adversarial query. For example, a user might ask a question regarding
|
333
|
+
# negative comments about the company or submit a query designed to
|
334
|
+
# generate unsafe, policy-violating output. If this field is set to
|
335
|
+
# `true`, we skip generating answers for adversarial queries and return
|
336
|
+
# fallback messages instead.
|
337
|
+
# @!attribute [rw] ignore_non_answer_seeking_query
|
338
|
+
# @return [::Boolean]
|
339
|
+
# Specifies whether to filter out queries that are not answer-seeking.
|
340
|
+
# The default value is `false`.
|
341
|
+
#
|
342
|
+
# Google employs search-query classification to detect answer-seeking
|
343
|
+
# queries. No answer is returned if the search query is classified as a
|
344
|
+
# non-answer seeking query. If this field is set to `true`, we skip
|
345
|
+
# generating answers for non-answer seeking queries and return
|
346
|
+
# fallback messages instead.
|
347
|
+
# @!attribute [rw] ignore_low_relevant_content
|
348
|
+
# @return [::Boolean]
|
349
|
+
# Specifies whether to filter out queries that have low relevance.
|
350
|
+
#
|
351
|
+
# If this field is set to `false`, all search results are used regardless
|
352
|
+
# of relevance to generate answers. If set to `true` or unset, the behavior
|
353
|
+
# will be determined automatically by the service.
|
354
|
+
class AnswerGenerationSpec
|
355
|
+
include ::Google::Protobuf::MessageExts
|
356
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
357
|
+
|
358
|
+
# Answer Generation Model specification.
|
359
|
+
# @!attribute [rw] model_version
|
360
|
+
# @return [::String]
|
361
|
+
# Model version. If not set, it will use the default stable model.
|
362
|
+
# Allowed values are: stable, preview.
|
363
|
+
class ModelSpec
|
364
|
+
include ::Google::Protobuf::MessageExts
|
365
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
366
|
+
end
|
367
|
+
|
368
|
+
# Answer generation prompt specification.
|
369
|
+
# @!attribute [rw] preamble
|
370
|
+
# @return [::String]
|
371
|
+
# Customized preamble.
|
372
|
+
class PromptSpec
|
373
|
+
include ::Google::Protobuf::MessageExts
|
374
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
375
|
+
end
|
376
|
+
end
|
377
|
+
|
378
|
+
# Search specification.
|
379
|
+
# @!attribute [rw] search_params
|
380
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchParams]
|
381
|
+
# Search parameters.
|
382
|
+
# @!attribute [rw] search_result_list
|
383
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList]
|
384
|
+
# Search result list.
|
385
|
+
class SearchSpec
|
386
|
+
include ::Google::Protobuf::MessageExts
|
387
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
388
|
+
|
389
|
+
# Search parameters.
|
390
|
+
# @!attribute [rw] max_return_results
|
391
|
+
# @return [::Integer]
|
392
|
+
# Number of search results to return.
|
393
|
+
# The default value is 10.
|
394
|
+
# @!attribute [rw] filter
|
395
|
+
# @return [::String]
|
396
|
+
# The filter syntax consists of an expression language for constructing
|
397
|
+
# a predicate from one or more fields of the documents being filtered.
|
398
|
+
# Filter expression is case-sensitive. This will be used to filter
|
399
|
+
# search results which may affect the Answer response.
|
400
|
+
#
|
401
|
+
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
402
|
+
#
|
403
|
+
# Filtering in Vertex AI Search is done by mapping the LHS filter key
|
404
|
+
# to a key property defined in the Vertex AI Search backend -- this
|
405
|
+
# mapping is defined by the customer in their schema. For example a
|
406
|
+
# media customers might have a field 'name' in their schema. In this
|
407
|
+
# case the filter would look like this: filter --> name:'ANY("king
|
408
|
+
# kong")'
|
409
|
+
#
|
410
|
+
# For more information about filtering including syntax and filter
|
411
|
+
# operators, see
|
412
|
+
# [Filter](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata)
|
413
|
+
# @!attribute [rw] boost_spec
|
414
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::SearchRequest::BoostSpec]
|
415
|
+
# Boost specification to boost certain documents in search results which
|
416
|
+
# may affect the answer query response. For more information on boosting,
|
417
|
+
# see [Boosting](https://cloud.google.com/retail/docs/boosting#boost)
|
418
|
+
# @!attribute [rw] order_by
|
419
|
+
# @return [::String]
|
420
|
+
# The order in which documents are returned. Documents can be ordered
|
421
|
+
# by a field in an {::Google::Cloud::DiscoveryEngine::V1::Document Document}
|
422
|
+
# object. Leave it unset if ordered by relevance. `order_by` expression
|
423
|
+
# is case-sensitive. For more information on ordering, see
|
424
|
+
# [Ordering](https://cloud.google.com/retail/docs/filter-and-order#order)
|
425
|
+
#
|
426
|
+
# If this field is unrecognizable, an `INVALID_ARGUMENT` is returned.
|
427
|
+
# @!attribute [rw] data_store_specs
|
428
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::SearchRequest::DataStoreSpec>]
|
429
|
+
# Specs defining dataStores to filter on in a search call and
|
430
|
+
# configurations for those dataStores. This is only considered for
|
431
|
+
# engines with multiple dataStores use case. For single dataStore within
|
432
|
+
# an engine, they should use the specs at the top level.
|
433
|
+
class SearchParams
|
434
|
+
include ::Google::Protobuf::MessageExts
|
435
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
436
|
+
end
|
437
|
+
|
438
|
+
# Search result list.
|
439
|
+
# @!attribute [rw] search_results
|
440
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult>]
|
441
|
+
# Search results.
|
442
|
+
class SearchResultList
|
443
|
+
include ::Google::Protobuf::MessageExts
|
444
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
445
|
+
|
446
|
+
# Search result.
|
447
|
+
# @!attribute [rw] unstructured_document_info
|
448
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo]
|
449
|
+
# Unstructured document information.
|
450
|
+
# @!attribute [rw] chunk_info
|
451
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::ChunkInfo]
|
452
|
+
# Chunk information.
|
453
|
+
class SearchResult
|
454
|
+
include ::Google::Protobuf::MessageExts
|
455
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
456
|
+
|
457
|
+
# Unstructured document information.
|
458
|
+
# @!attribute [rw] document
|
459
|
+
# @return [::String]
|
460
|
+
# Document resource name.
|
461
|
+
# @!attribute [rw] uri
|
462
|
+
# @return [::String]
|
463
|
+
# URI for the document.
|
464
|
+
# @!attribute [rw] title
|
465
|
+
# @return [::String]
|
466
|
+
# Title.
|
467
|
+
# @!attribute [rw] document_contexts
|
468
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::DocumentContext>]
|
469
|
+
# List of document contexts.
|
470
|
+
# @!attribute [rw] extractive_segments
|
471
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveSegment>]
|
472
|
+
# List of extractive segments.
|
473
|
+
# @!attribute [rw] extractive_answers
|
474
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::SearchSpec::SearchResultList::SearchResult::UnstructuredDocumentInfo::ExtractiveAnswer>]
|
475
|
+
# List of extractive answers.
|
476
|
+
class UnstructuredDocumentInfo
|
477
|
+
include ::Google::Protobuf::MessageExts
|
478
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
479
|
+
|
480
|
+
# Document context.
|
481
|
+
# @!attribute [rw] page_identifier
|
482
|
+
# @return [::String]
|
483
|
+
# Page identifier.
|
484
|
+
# @!attribute [rw] content
|
485
|
+
# @return [::String]
|
486
|
+
# Document content.
|
487
|
+
class DocumentContext
|
488
|
+
include ::Google::Protobuf::MessageExts
|
489
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
490
|
+
end
|
491
|
+
|
492
|
+
# Extractive segment.
|
493
|
+
# [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#extractive-segments)
|
494
|
+
# @!attribute [rw] page_identifier
|
495
|
+
# @return [::String]
|
496
|
+
# Page identifier.
|
497
|
+
# @!attribute [rw] content
|
498
|
+
# @return [::String]
|
499
|
+
# Extractive segment content.
|
500
|
+
class ExtractiveSegment
|
501
|
+
include ::Google::Protobuf::MessageExts
|
502
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
503
|
+
end
|
504
|
+
|
505
|
+
# Extractive answer.
|
506
|
+
# [Guide](https://cloud.google.com/generative-ai-app-builder/docs/snippets#get-answers)
|
507
|
+
# @!attribute [rw] page_identifier
|
508
|
+
# @return [::String]
|
509
|
+
# Page identifier.
|
510
|
+
# @!attribute [rw] content
|
511
|
+
# @return [::String]
|
512
|
+
# Extractive answer content.
|
513
|
+
class ExtractiveAnswer
|
514
|
+
include ::Google::Protobuf::MessageExts
|
515
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
516
|
+
end
|
517
|
+
end
|
518
|
+
|
519
|
+
# Chunk information.
|
520
|
+
# @!attribute [rw] chunk
|
521
|
+
# @return [::String]
|
522
|
+
# Chunk resource name.
|
523
|
+
# @!attribute [rw] content
|
524
|
+
# @return [::String]
|
525
|
+
# Chunk textual content.
|
526
|
+
class ChunkInfo
|
527
|
+
include ::Google::Protobuf::MessageExts
|
528
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
529
|
+
end
|
530
|
+
end
|
531
|
+
end
|
532
|
+
end
|
533
|
+
|
534
|
+
# Query understanding specification.
|
535
|
+
# @!attribute [rw] query_classification_spec
|
536
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec]
|
537
|
+
# Query classification specification.
|
538
|
+
# @!attribute [rw] query_rephraser_spec
|
539
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryRephraserSpec]
|
540
|
+
# Query rephraser specification.
|
541
|
+
class QueryUnderstandingSpec
|
542
|
+
include ::Google::Protobuf::MessageExts
|
543
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
544
|
+
|
545
|
+
# Query classification specification.
|
546
|
+
# @!attribute [rw] types
|
547
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest::QueryUnderstandingSpec::QueryClassificationSpec::Type>]
|
548
|
+
# Enabled query classification types.
|
549
|
+
class QueryClassificationSpec
|
550
|
+
include ::Google::Protobuf::MessageExts
|
551
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
552
|
+
|
553
|
+
# Query classification types.
|
554
|
+
module Type
|
555
|
+
# Unspecified query classification type.
|
556
|
+
TYPE_UNSPECIFIED = 0
|
557
|
+
|
558
|
+
# Adversarial query classification type.
|
559
|
+
ADVERSARIAL_QUERY = 1
|
560
|
+
|
561
|
+
# Non-answer-seeking query classification type.
|
562
|
+
NON_ANSWER_SEEKING_QUERY = 2
|
563
|
+
end
|
564
|
+
end
|
565
|
+
|
566
|
+
# Query rephraser specification.
|
567
|
+
# @!attribute [rw] disable
|
568
|
+
# @return [::Boolean]
|
569
|
+
# Disable query rephraser.
|
570
|
+
class QueryRephraserSpec
|
571
|
+
include ::Google::Protobuf::MessageExts
|
572
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
573
|
+
end
|
574
|
+
end
|
575
|
+
end
|
576
|
+
|
577
|
+
# Response message for
|
578
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#answer_query ConversationalSearchService.AnswerQuery}
|
579
|
+
# method.
|
580
|
+
# @!attribute [rw] answer
|
581
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Answer]
|
582
|
+
# Answer resource object.
|
583
|
+
# If [AnswerQueryRequest.StepSpec.max_step_count][] is greater than 1,
|
584
|
+
# use {::Google::Cloud::DiscoveryEngine::V1::Answer#name Answer.name} to fetch
|
585
|
+
# answer information using
|
586
|
+
# {::Google::Cloud::DiscoveryEngine::V1::ConversationalSearchService::Client#get_answer ConversationalSearchService.GetAnswer}
|
587
|
+
# API.
|
588
|
+
# @!attribute [rw] session
|
589
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Session]
|
590
|
+
# Session resource object.
|
591
|
+
# It will be only available when session field is set and valid in the
|
592
|
+
# {::Google::Cloud::DiscoveryEngine::V1::AnswerQueryRequest AnswerQueryRequest}
|
593
|
+
# request.
|
594
|
+
# @!attribute [rw] answer_query_token
|
595
|
+
# @return [::String]
|
596
|
+
# A global unique ID used for logging.
|
597
|
+
class AnswerQueryResponse
|
598
|
+
include ::Google::Protobuf::MessageExts
|
599
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
600
|
+
end
|
601
|
+
|
602
|
+
# Request for GetAnswer method.
|
603
|
+
# @!attribute [rw] name
|
604
|
+
# @return [::String]
|
605
|
+
# Required. The resource name of the Answer to get. Format:
|
606
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/engines/{engine_id}/sessions/{session_id}/answers/{answer_id}`
|
607
|
+
class GetAnswerRequest
|
608
|
+
include ::Google::Protobuf::MessageExts
|
609
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
610
|
+
end
|
611
|
+
|
612
|
+
# Request for CreateSession method.
|
613
|
+
# @!attribute [rw] parent
|
614
|
+
# @return [::String]
|
615
|
+
# Required. Full resource name of parent data store. Format:
|
616
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
|
617
|
+
# @!attribute [rw] session
|
618
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Session]
|
619
|
+
# Required. The session to create.
|
620
|
+
class CreateSessionRequest
|
621
|
+
include ::Google::Protobuf::MessageExts
|
622
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
623
|
+
end
|
624
|
+
|
625
|
+
# Request for UpdateSession method.
|
626
|
+
# @!attribute [rw] session
|
627
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::Session]
|
628
|
+
# Required. The Session to update.
|
629
|
+
# @!attribute [rw] update_mask
|
630
|
+
# @return [::Google::Protobuf::FieldMask]
|
631
|
+
# Indicates which fields in the provided
|
632
|
+
# {::Google::Cloud::DiscoveryEngine::V1::Session Session} to update. The following
|
633
|
+
# are NOT supported:
|
634
|
+
#
|
635
|
+
# * {::Google::Cloud::DiscoveryEngine::V1::Session#name Session.name}
|
636
|
+
#
|
637
|
+
# If not set or empty, all supported fields are updated.
|
638
|
+
class UpdateSessionRequest
|
639
|
+
include ::Google::Protobuf::MessageExts
|
640
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
641
|
+
end
|
642
|
+
|
643
|
+
# Request for DeleteSession method.
|
644
|
+
# @!attribute [rw] name
|
645
|
+
# @return [::String]
|
646
|
+
# Required. The resource name of the Session to delete. Format:
|
647
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
|
648
|
+
class DeleteSessionRequest
|
649
|
+
include ::Google::Protobuf::MessageExts
|
650
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
651
|
+
end
|
652
|
+
|
653
|
+
# Request for GetSession method.
|
654
|
+
# @!attribute [rw] name
|
655
|
+
# @return [::String]
|
656
|
+
# Required. The resource name of the Session to get. Format:
|
657
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}/sessions/{session_id}`
|
658
|
+
class GetSessionRequest
|
659
|
+
include ::Google::Protobuf::MessageExts
|
660
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
661
|
+
end
|
662
|
+
|
663
|
+
# Request for ListSessions method.
|
664
|
+
# @!attribute [rw] parent
|
665
|
+
# @return [::String]
|
666
|
+
# Required. The data store resource name. Format:
|
667
|
+
# `projects/{project_number}/locations/{location_id}/collections/{collection}/dataStores/{data_store_id}`
|
668
|
+
# @!attribute [rw] page_size
|
669
|
+
# @return [::Integer]
|
670
|
+
# Maximum number of results to return. If unspecified, defaults
|
671
|
+
# to 50. Max allowed value is 1000.
|
672
|
+
# @!attribute [rw] page_token
|
673
|
+
# @return [::String]
|
674
|
+
# A page token, received from a previous `ListSessions` call.
|
675
|
+
# Provide this to retrieve the subsequent page.
|
676
|
+
# @!attribute [rw] filter
|
677
|
+
# @return [::String]
|
678
|
+
# A filter to apply on the list results. The supported features are:
|
679
|
+
# user_pseudo_id, state.
|
680
|
+
#
|
681
|
+
# Example:
|
682
|
+
# "user_pseudo_id = some_id"
|
683
|
+
# @!attribute [rw] order_by
|
684
|
+
# @return [::String]
|
685
|
+
# A comma-separated list of fields to order by, sorted in ascending order.
|
686
|
+
# Use "desc" after a field name for descending.
|
687
|
+
# Supported fields:
|
688
|
+
# * `update_time`
|
689
|
+
# * `create_time`
|
690
|
+
# * `session_name`
|
691
|
+
#
|
692
|
+
# Example:
|
693
|
+
# "update_time desc"
|
694
|
+
# "create_time"
|
695
|
+
class ListSessionsRequest
|
696
|
+
include ::Google::Protobuf::MessageExts
|
697
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
698
|
+
end
|
699
|
+
|
700
|
+
# Response for ListSessions method.
|
701
|
+
# @!attribute [rw] sessions
|
702
|
+
# @return [::Array<::Google::Cloud::DiscoveryEngine::V1::Session>]
|
703
|
+
# All the Sessions for a given data store.
|
704
|
+
# @!attribute [rw] next_page_token
|
705
|
+
# @return [::String]
|
706
|
+
# Pagination token, if not returned indicates the last page.
|
707
|
+
class ListSessionsResponse
|
708
|
+
include ::Google::Protobuf::MessageExts
|
709
|
+
extend ::Google::Protobuf::MessageExts::ClassMethods
|
710
|
+
end
|
226
711
|
end
|
227
712
|
end
|
228
713
|
end
|
@@ -61,6 +61,9 @@ module Google
|
|
61
61
|
# @return [::Google::Protobuf::Timestamp]
|
62
62
|
# Output only. Timestamp the
|
63
63
|
# {::Google::Cloud::DiscoveryEngine::V1::DataStore DataStore} was created at.
|
64
|
+
# @!attribute [rw] document_processing_config
|
65
|
+
# @return [::Google::Cloud::DiscoveryEngine::V1::DocumentProcessingConfig]
|
66
|
+
# Configuration for Document understanding and enrichment.
|
64
67
|
# @!attribute [rw] starting_schema
|
65
68
|
# @return [::Google::Cloud::DiscoveryEngine::V1::Schema]
|
66
69
|
# The start schema to use for this
|
@@ -123,8 +123,8 @@ module Google
|
|
123
123
|
# INVALID_ARGUMENT error is returned.
|
124
124
|
# @!attribute [rw] filter
|
125
125
|
# @return [::String]
|
126
|
-
# Filter by solution type.
|
127
|
-
# 'solution_type:SOLUTION_TYPE_SEARCH'
|
126
|
+
# Filter by solution type .
|
127
|
+
# For example: `filter = 'solution_type:SOLUTION_TYPE_SEARCH'`
|
128
128
|
class ListDataStoresRequest
|
129
129
|
include ::Google::Protobuf::MessageExts
|
130
130
|
extend ::Google::Protobuf::MessageExts::ClassMethods
|