google-cloud-discovery_engine-v1 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +33 -4
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +39 -3
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +968 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/credentials.rb +47 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/paths.rb +176 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/client.rb +897 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest/service_stub.rb +450 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/rest.rb +52 -0
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service.rb +55 -0
- data/lib/google/cloud/discovery_engine/v1/document_service/client.rb +33 -9
- data/lib/google/cloud/discovery_engine/v1/document_service/operations.rb +10 -1
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +153 -8
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +117 -0
- data/lib/google/cloud/discovery_engine/v1/rest.rb +2 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +24 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/operations.rb +10 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +119 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +117 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +55 -10
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +67 -12
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +29 -6
- data/lib/google/cloud/discovery_engine/v1/user_event_service/operations.rb +10 -1
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +74 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +117 -0
- data/lib/google/cloud/discovery_engine/v1/version.rb +1 -1
- data/lib/google/cloud/discovery_engine/v1.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/common_pb.rb +2 -1
- data/lib/google/cloud/discoveryengine/v1/completion_service_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/conversation_pb.rb +54 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_pb.rb +61 -0
- data/lib/google/cloud/discoveryengine/v1/conversational_search_service_services_pb.rb +67 -0
- data/lib/google/cloud/discoveryengine/v1/import_config_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/search_service_pb.rb +13 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_pb.rb +1 -1
- data/lib/google/cloud/discoveryengine/v1/user_event_service_services_pb.rb +1 -1
- data/proto_docs/google/api/field_behavior.rb +14 -0
- data/proto_docs/google/cloud/discoveryengine/v1/common.rb +19 -2
- data/proto_docs/google/cloud/discoveryengine/v1/completion_service.rb +15 -2
- data/proto_docs/google/cloud/discoveryengine/v1/conversation.rb +113 -0
- data/proto_docs/google/cloud/discoveryengine/v1/conversational_search_service.rb +206 -0
- data/proto_docs/google/cloud/discoveryengine/v1/document.rb +8 -5
- data/proto_docs/google/cloud/discoveryengine/v1/document_service.rb +4 -3
- data/proto_docs/google/cloud/discoveryengine/v1/import_config.rb +23 -19
- data/proto_docs/google/cloud/discoveryengine/v1/search_service.rb +455 -19
- data/proto_docs/google/cloud/discoveryengine/v1/user_event.rb +44 -32
- data/proto_docs/google/cloud/discoveryengine/v1/user_event_service.rb +1 -1
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- metadata +38 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 612779fb26fbf2d52a5d3c825d5e664bc23206248dc5a171b723e7d5f5e1a852
|
4
|
+
data.tar.gz: ee192e70a8de293037cb9b2d8d97788c7501f7537e647bb20d330a304835ebf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5642a09d8b0e95211e5feeae43578c80fec411a6d08334852c199c4eb3de7eba954a4b4a5fb5c24e680923313f619e6c3e15df350c0bd90593c07225f08a6fa
|
7
|
+
data.tar.gz: ffb576b76c3bf6ddb71389b7e36add869500050a4bf7d42a146b5a99d401f12fdce475e872ec4b84ee46965970c00f58a963903d03e543600e33baced6315caf
|
data/README.md
CHANGED
@@ -40,7 +40,7 @@ response = client.complete_query request
|
|
40
40
|
View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-discovery_engine-v1/latest)
|
41
41
|
for class and method documentation.
|
42
42
|
|
43
|
-
See also the [Product Documentation](https://cloud.google.com/
|
43
|
+
See also the [Product Documentation](https://cloud.google.com/generative-ai-app-builder/docs)
|
44
44
|
for general usage information.
|
45
45
|
|
46
46
|
## Enabling Logging
|
@@ -18,6 +18,7 @@
|
|
18
18
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/discoveryengine/v1/completion_service_pb"
|
21
|
+
require "google/cloud/location"
|
21
22
|
|
22
23
|
module Google
|
23
24
|
module Cloud
|
@@ -138,15 +139,29 @@ module Google
|
|
138
139
|
@quota_project_id = @config.quota_project
|
139
140
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
140
141
|
|
142
|
+
@location_client = Google::Cloud::Location::Locations::Client.new do |config|
|
143
|
+
config.credentials = credentials
|
144
|
+
config.quota_project = @quota_project_id
|
145
|
+
config.endpoint = @config.endpoint
|
146
|
+
end
|
147
|
+
|
141
148
|
@completion_service_stub = ::Gapic::ServiceStub.new(
|
142
149
|
::Google::Cloud::DiscoveryEngine::V1::CompletionService::Stub,
|
143
150
|
credentials: credentials,
|
144
151
|
endpoint: @config.endpoint,
|
145
152
|
channel_args: @config.channel_args,
|
146
|
-
interceptors: @config.interceptors
|
153
|
+
interceptors: @config.interceptors,
|
154
|
+
channel_pool_config: @config.channel_pool
|
147
155
|
)
|
148
156
|
end
|
149
157
|
|
158
|
+
##
|
159
|
+
# Get the associated client for mix-in of the Locations.
|
160
|
+
#
|
161
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
162
|
+
#
|
163
|
+
attr_reader :location_client
|
164
|
+
|
150
165
|
# Service calls
|
151
166
|
|
152
167
|
##
|
@@ -162,7 +177,7 @@ module Google
|
|
162
177
|
# @param options [::Gapic::CallOptions, ::Hash]
|
163
178
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
164
179
|
#
|
165
|
-
# @overload complete_query(data_store: nil, query: nil, query_model: nil, user_pseudo_id: nil)
|
180
|
+
# @overload complete_query(data_store: nil, query: nil, query_model: nil, user_pseudo_id: nil, include_tail_suggestions: nil)
|
166
181
|
# Pass arguments to `complete_query` via keyword arguments. Note that at
|
167
182
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
168
183
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -184,13 +199,14 @@ module Google
|
|
184
199
|
# API calls. Do not use it when there is no traffic for Search API.
|
185
200
|
# * `user-event` - Using suggestions generated from user-imported search
|
186
201
|
# events.
|
202
|
+
# * `document-completable` - Using suggestions taken directly from
|
203
|
+
# user-imported document fields marked as completable.
|
187
204
|
#
|
188
205
|
# Default values:
|
189
206
|
#
|
190
207
|
# * `document` is the default model for regular dataStores.
|
191
208
|
# * `search-history` is the default model for
|
192
|
-
# [IndustryVertical.SITE_SEARCH][
|
193
|
-
# dataStores.
|
209
|
+
# [IndustryVertical.SITE_SEARCH][] dataStores.
|
194
210
|
# @param user_pseudo_id [::String]
|
195
211
|
# A unique identifier for tracking visitors. For example, this could be
|
196
212
|
# implemented with an HTTP cookie, which should be able to uniquely identify
|
@@ -206,6 +222,11 @@ module Google
|
|
206
222
|
#
|
207
223
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
208
224
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
225
|
+
# @param include_tail_suggestions [::Boolean]
|
226
|
+
# Indicates if tail suggestions should be returned if there are no
|
227
|
+
# suggestions that match the full query. Even if set to true, if there are
|
228
|
+
# suggestions that match the full query, those are returned and no
|
229
|
+
# tail suggestions are returned.
|
209
230
|
#
|
210
231
|
# @yield [response, operation] Access the result along with the RPC operation
|
211
232
|
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::CompleteQueryResponse]
|
@@ -390,6 +411,14 @@ module Google
|
|
390
411
|
end
|
391
412
|
end
|
392
413
|
|
414
|
+
##
|
415
|
+
# Configuration for the channel pool
|
416
|
+
# @return [::Gapic::ServiceStub::ChannelPool::Configuration]
|
417
|
+
#
|
418
|
+
def channel_pool
|
419
|
+
@channel_pool ||= ::Gapic::ServiceStub::ChannelPool::Configuration.new
|
420
|
+
end
|
421
|
+
|
393
422
|
##
|
394
423
|
# Configuration RPC class for the CompletionService API.
|
395
424
|
#
|
@@ -19,6 +19,7 @@
|
|
19
19
|
require "google/cloud/errors"
|
20
20
|
require "google/cloud/discoveryengine/v1/completion_service_pb"
|
21
21
|
require "google/cloud/discovery_engine/v1/completion_service/rest/service_stub"
|
22
|
+
require "google/cloud/location/rest"
|
22
23
|
|
23
24
|
module Google
|
24
25
|
module Cloud
|
@@ -135,9 +136,22 @@ module Google
|
|
135
136
|
@quota_project_id = @config.quota_project
|
136
137
|
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
137
138
|
|
139
|
+
@location_client = Google::Cloud::Location::Locations::Rest::Client.new do |config|
|
140
|
+
config.credentials = credentials
|
141
|
+
config.quota_project = @quota_project_id
|
142
|
+
config.endpoint = @config.endpoint
|
143
|
+
end
|
144
|
+
|
138
145
|
@completion_service_stub = ::Google::Cloud::DiscoveryEngine::V1::CompletionService::Rest::ServiceStub.new endpoint: @config.endpoint, credentials: credentials
|
139
146
|
end
|
140
147
|
|
148
|
+
##
|
149
|
+
# Get the associated client for mix-in of the Locations.
|
150
|
+
#
|
151
|
+
# @return [Google::Cloud::Location::Locations::Rest::Client]
|
152
|
+
#
|
153
|
+
attr_reader :location_client
|
154
|
+
|
141
155
|
# Service calls
|
142
156
|
|
143
157
|
##
|
@@ -153,7 +167,7 @@ module Google
|
|
153
167
|
# @param options [::Gapic::CallOptions, ::Hash]
|
154
168
|
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
155
169
|
#
|
156
|
-
# @overload complete_query(data_store: nil, query: nil, query_model: nil, user_pseudo_id: nil)
|
170
|
+
# @overload complete_query(data_store: nil, query: nil, query_model: nil, user_pseudo_id: nil, include_tail_suggestions: nil)
|
157
171
|
# Pass arguments to `complete_query` via keyword arguments. Note that at
|
158
172
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
159
173
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -175,13 +189,14 @@ module Google
|
|
175
189
|
# API calls. Do not use it when there is no traffic for Search API.
|
176
190
|
# * `user-event` - Using suggestions generated from user-imported search
|
177
191
|
# events.
|
192
|
+
# * `document-completable` - Using suggestions taken directly from
|
193
|
+
# user-imported document fields marked as completable.
|
178
194
|
#
|
179
195
|
# Default values:
|
180
196
|
#
|
181
197
|
# * `document` is the default model for regular dataStores.
|
182
198
|
# * `search-history` is the default model for
|
183
|
-
# [IndustryVertical.SITE_SEARCH][
|
184
|
-
# dataStores.
|
199
|
+
# [IndustryVertical.SITE_SEARCH][] dataStores.
|
185
200
|
# @param user_pseudo_id [::String]
|
186
201
|
# A unique identifier for tracking visitors. For example, this could be
|
187
202
|
# implemented with an HTTP cookie, which should be able to uniquely identify
|
@@ -197,6 +212,11 @@ module Google
|
|
197
212
|
#
|
198
213
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
199
214
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
215
|
+
# @param include_tail_suggestions [::Boolean]
|
216
|
+
# Indicates if tail suggestions should be returned if there are no
|
217
|
+
# suggestions that match the full query. Even if set to true, if there are
|
218
|
+
# suggestions that match the full query, those are returned and no
|
219
|
+
# tail suggestions are returned.
|
200
220
|
# @yield [result, operation] Access the result along with the TransportOperation object
|
201
221
|
# @yieldparam result [::Google::Cloud::DiscoveryEngine::V1::CompleteQueryResponse]
|
202
222
|
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
@@ -204,6 +224,22 @@ module Google
|
|
204
224
|
# @return [::Google::Cloud::DiscoveryEngine::V1::CompleteQueryResponse]
|
205
225
|
#
|
206
226
|
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
227
|
+
#
|
228
|
+
# @example Basic example
|
229
|
+
# require "google/cloud/discovery_engine/v1"
|
230
|
+
#
|
231
|
+
# # Create a client object. The client can be reused for multiple calls.
|
232
|
+
# client = Google::Cloud::DiscoveryEngine::V1::CompletionService::Rest::Client.new
|
233
|
+
#
|
234
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
235
|
+
# request = Google::Cloud::DiscoveryEngine::V1::CompleteQueryRequest.new
|
236
|
+
#
|
237
|
+
# # Call the complete_query method.
|
238
|
+
# result = client.complete_query request
|
239
|
+
#
|
240
|
+
# # The returned object is of type Google::Cloud::DiscoveryEngine::V1::CompleteQueryResponse.
|
241
|
+
# p result
|
242
|
+
#
|
207
243
|
def complete_query request, options = nil
|
208
244
|
raise ::ArgumentError, "request must be provided" if request.nil?
|
209
245
|
|