google-cloud-discovery_engine-v1 0.1.0 → 0.2.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/README.md +1 -1
- data/lib/google/cloud/discovery_engine/v1/completion_service/client.rb +23 -3
- data/lib/google/cloud/discovery_engine/v1/completion_service/rest/client.rb +23 -3
- data/lib/google/cloud/discovery_engine/v1/conversational_search_service/client.rb +959 -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 +797 -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 +23 -8
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/client.rb +23 -8
- data/lib/google/cloud/discovery_engine/v1/document_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1/rest.rb +2 -1
- data/lib/google/cloud/discovery_engine/v1/schema_service/client.rb +14 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/client.rb +14 -0
- data/lib/google/cloud/discovery_engine/v1/schema_service/rest/operations.rb +42 -0
- data/lib/google/cloud/discovery_engine/v1/search_service/client.rb +45 -9
- data/lib/google/cloud/discovery_engine/v1/search_service/rest/client.rb +47 -12
- data/lib/google/cloud/discovery_engine/v1/user_event_service/client.rb +19 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/client.rb +19 -5
- data/lib/google/cloud/discovery_engine/v1/user_event_service/rest/operations.rb +42 -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 +36 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 285ec9baea1273b5c54228a27bcec95c488f915fb7b7abc35015a4cca626c07f
|
4
|
+
data.tar.gz: '09e794c4ead146e7cec898d324ee887227d2ec695d339cba6cb8bbb84bab74d6'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d9cbaa5a78b96340f8ee0533df89ded2834b482ec85f094c491acd20b2a92ab5a5314e4a6185ee8038821338f880c065c6bc6ad142f236015931fafcb3c35fab
|
7
|
+
data.tar.gz: 777c9f11f49749c638646ea25a584513aafcbe3350c7be944fbd8389e12b9de223295bf51675cf6c8e700fd5695b73bad07f9eee23bc9e3c2a0f86fedf44f8c2
|
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,6 +139,12 @@ 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,
|
@@ -147,6 +154,13 @@ module Google
|
|
147
154
|
)
|
148
155
|
end
|
149
156
|
|
157
|
+
##
|
158
|
+
# Get the associated client for mix-in of the Locations.
|
159
|
+
#
|
160
|
+
# @return [Google::Cloud::Location::Locations::Client]
|
161
|
+
#
|
162
|
+
attr_reader :location_client
|
163
|
+
|
150
164
|
# Service calls
|
151
165
|
|
152
166
|
##
|
@@ -162,7 +176,7 @@ module Google
|
|
162
176
|
# @param options [::Gapic::CallOptions, ::Hash]
|
163
177
|
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
164
178
|
#
|
165
|
-
# @overload complete_query(data_store: nil, query: nil, query_model: nil, user_pseudo_id: nil)
|
179
|
+
# @overload complete_query(data_store: nil, query: nil, query_model: nil, user_pseudo_id: nil, include_tail_suggestions: nil)
|
166
180
|
# Pass arguments to `complete_query` via keyword arguments. Note that at
|
167
181
|
# least one keyword argument is required. To specify no parameters, or to keep all
|
168
182
|
# the default parameter values, pass an empty Hash as a request object (see above).
|
@@ -184,13 +198,14 @@ module Google
|
|
184
198
|
# API calls. Do not use it when there is no traffic for Search API.
|
185
199
|
# * `user-event` - Using suggestions generated from user-imported search
|
186
200
|
# events.
|
201
|
+
# * `document-completable` - Using suggestions taken directly from
|
202
|
+
# user-imported document fields marked as completable.
|
187
203
|
#
|
188
204
|
# Default values:
|
189
205
|
#
|
190
206
|
# * `document` is the default model for regular dataStores.
|
191
207
|
# * `search-history` is the default model for
|
192
|
-
# [IndustryVertical.SITE_SEARCH][
|
193
|
-
# dataStores.
|
208
|
+
# [IndustryVertical.SITE_SEARCH][] dataStores.
|
194
209
|
# @param user_pseudo_id [::String]
|
195
210
|
# A unique identifier for tracking visitors. For example, this could be
|
196
211
|
# implemented with an HTTP cookie, which should be able to uniquely identify
|
@@ -206,6 +221,11 @@ module Google
|
|
206
221
|
#
|
207
222
|
# The field must be a UTF-8 encoded string with a length limit of 128
|
208
223
|
# characters. Otherwise, an `INVALID_ARGUMENT` error is returned.
|
224
|
+
# @param include_tail_suggestions [::Boolean]
|
225
|
+
# Indicates if tail suggestions should be returned if there are no
|
226
|
+
# suggestions that match the full query. Even if set to true, if there are
|
227
|
+
# suggestions that match the full query, those are returned and no
|
228
|
+
# tail suggestions are returned.
|
209
229
|
#
|
210
230
|
# @yield [response, operation] Access the result along with the RPC operation
|
211
231
|
# @yieldparam response [::Google::Cloud::DiscoveryEngine::V1::CompleteQueryResponse]
|
@@ -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]
|