google-cloud-ai_platform-v1 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +137 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/operations.rb +821 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/paths.rb +36 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/client.rb +130 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/operations.rb +4398 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest/service_stub.rb +62 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service/rest.rb +1 -0
- data/lib/google/cloud/ai_platform/v1/model_garden_service.rb +1 -0
- data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +198 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/paths.rb +17 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/client.rb +184 -0
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/rest/service_stub.rb +123 -0
- data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +3 -1
- data/lib/google/cloud/aiplatform/v1/model_garden_service_pb.rb +14 -1
- data/lib/google/cloud/aiplatform/v1/model_garden_service_services_pb.rb +2 -0
- data/lib/google/cloud/aiplatform/v1/service_networking_pb.rb +3 -1
- data/lib/google/cloud/aiplatform/v1/vertex_rag_data_pb.rb +6 -1
- data/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_pb.rb +4 -1
- data/lib/google/cloud/aiplatform/v1/vertex_rag_data_service_services_pb.rb +4 -0
- data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +31 -6
- data/proto_docs/google/cloud/aiplatform/v1/model_garden_service.rb +153 -0
- data/proto_docs/google/cloud/aiplatform/v1/service_networking.rb +61 -5
- data/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data.rb +67 -0
- data/proto_docs/google/cloud/aiplatform/v1/vertex_rag_data_service.rb +35 -0
- metadata +3 -1
@@ -113,6 +113,46 @@ module Google
|
|
113
113
|
end
|
114
114
|
end
|
115
115
|
|
116
|
+
##
|
117
|
+
# Baseline implementation for the deploy REST call
|
118
|
+
#
|
119
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::DeployRequest]
|
120
|
+
# A request object representing the call parameters. Required.
|
121
|
+
# @param options [::Gapic::CallOptions]
|
122
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
123
|
+
#
|
124
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
125
|
+
# @yieldparam result [::Google::Longrunning::Operation]
|
126
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
127
|
+
#
|
128
|
+
# @return [::Google::Longrunning::Operation]
|
129
|
+
# A result object deserialized from the server's reply
|
130
|
+
def deploy request_pb, options = nil
|
131
|
+
raise ::ArgumentError, "request must be provided" if request_pb.nil?
|
132
|
+
|
133
|
+
verb, uri, query_string_params, body = ServiceStub.transcode_deploy_request request_pb
|
134
|
+
query_string_params = if query_string_params.any?
|
135
|
+
query_string_params.to_h { |p| p.split "=", 2 }
|
136
|
+
else
|
137
|
+
{}
|
138
|
+
end
|
139
|
+
|
140
|
+
response = @client_stub.make_http_request(
|
141
|
+
verb,
|
142
|
+
uri: uri,
|
143
|
+
body: body || "",
|
144
|
+
params: query_string_params,
|
145
|
+
method_name: "deploy",
|
146
|
+
options: options
|
147
|
+
)
|
148
|
+
operation = ::Gapic::Rest::TransportOperation.new response
|
149
|
+
result = ::Google::Longrunning::Operation.decode_json response.body, ignore_unknown_fields: true
|
150
|
+
catch :response do
|
151
|
+
yield result, operation if block_given?
|
152
|
+
result
|
153
|
+
end
|
154
|
+
end
|
155
|
+
|
116
156
|
##
|
117
157
|
# @private
|
118
158
|
#
|
@@ -133,6 +173,28 @@ module Google
|
|
133
173
|
)
|
134
174
|
transcoder.transcode request_pb
|
135
175
|
end
|
176
|
+
|
177
|
+
##
|
178
|
+
# @private
|
179
|
+
#
|
180
|
+
# GRPC transcoding helper method for the deploy REST call
|
181
|
+
#
|
182
|
+
# @param request_pb [::Google::Cloud::AIPlatform::V1::DeployRequest]
|
183
|
+
# A request object representing the call parameters. Required.
|
184
|
+
# @return [Array(String, [String, nil], Hash{String => String})]
|
185
|
+
# Uri, Body, Query string parameters
|
186
|
+
def self.transcode_deploy_request request_pb
|
187
|
+
transcoder = Gapic::Rest::GrpcTranscoder.new
|
188
|
+
.with_bindings(
|
189
|
+
uri_method: :post,
|
190
|
+
uri_template: "/v1/{destination}:deploy",
|
191
|
+
body: "*",
|
192
|
+
matches: [
|
193
|
+
["destination", %r{^projects/[^/]+/locations/[^/]+/?$}, false]
|
194
|
+
]
|
195
|
+
)
|
196
|
+
transcoder.transcode request_pb
|
197
|
+
end
|
136
198
|
end
|
137
199
|
end
|
138
200
|
end
|
@@ -25,6 +25,7 @@ require "google/cloud/ai_platform/v1/bindings_override"
|
|
25
25
|
|
26
26
|
require "google/cloud/ai_platform/v1/model_garden_service/credentials"
|
27
27
|
require "google/cloud/ai_platform/v1/model_garden_service/paths"
|
28
|
+
require "google/cloud/ai_platform/v1/model_garden_service/rest/operations"
|
28
29
|
require "google/cloud/ai_platform/v1/model_garden_service/rest/client"
|
29
30
|
|
30
31
|
module Google
|
@@ -24,6 +24,7 @@ require "google/cloud/ai_platform/v1/version"
|
|
24
24
|
|
25
25
|
require "google/cloud/ai_platform/v1/model_garden_service/credentials"
|
26
26
|
require "google/cloud/ai_platform/v1/model_garden_service/paths"
|
27
|
+
require "google/cloud/ai_platform/v1/model_garden_service/operations"
|
27
28
|
require "google/cloud/ai_platform/v1/model_garden_service/client"
|
28
29
|
require "google/cloud/ai_platform/v1/model_garden_service/rest"
|
29
30
|
|
@@ -1185,6 +1185,190 @@ module Google
|
|
1185
1185
|
raise ::Google::Cloud::Error.from_error(e)
|
1186
1186
|
end
|
1187
1187
|
|
1188
|
+
##
|
1189
|
+
# Updates a RagEngineConfig.
|
1190
|
+
#
|
1191
|
+
# @overload update_rag_engine_config(request, options = nil)
|
1192
|
+
# Pass arguments to `update_rag_engine_config` via a request object, either of type
|
1193
|
+
# {::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest} or an equivalent Hash.
|
1194
|
+
#
|
1195
|
+
# @param request [::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest, ::Hash]
|
1196
|
+
# A request object representing the call parameters. Required. To specify no
|
1197
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1198
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1199
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1200
|
+
#
|
1201
|
+
# @overload update_rag_engine_config(rag_engine_config: nil)
|
1202
|
+
# Pass arguments to `update_rag_engine_config` via keyword arguments. Note that at
|
1203
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1204
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1205
|
+
#
|
1206
|
+
# @param rag_engine_config [::Google::Cloud::AIPlatform::V1::RagEngineConfig, ::Hash]
|
1207
|
+
# Required. The updated RagEngineConfig.
|
1208
|
+
#
|
1209
|
+
# NOTE: Downgrading your RagManagedDb's ComputeTier could temporarily
|
1210
|
+
# increase request latencies until the operation is fully complete.
|
1211
|
+
#
|
1212
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1213
|
+
# @yieldparam response [::Gapic::Operation]
|
1214
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1215
|
+
#
|
1216
|
+
# @return [::Gapic::Operation]
|
1217
|
+
#
|
1218
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1219
|
+
#
|
1220
|
+
# @example Basic example
|
1221
|
+
# require "google/cloud/ai_platform/v1"
|
1222
|
+
#
|
1223
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1224
|
+
# client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Client.new
|
1225
|
+
#
|
1226
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1227
|
+
# request = Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest.new
|
1228
|
+
#
|
1229
|
+
# # Call the update_rag_engine_config method.
|
1230
|
+
# result = client.update_rag_engine_config request
|
1231
|
+
#
|
1232
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1233
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1234
|
+
# # Here is how to wait for a response.
|
1235
|
+
# result.wait_until_done! timeout: 60
|
1236
|
+
# if result.response?
|
1237
|
+
# p result.response
|
1238
|
+
# else
|
1239
|
+
# puts "No response received."
|
1240
|
+
# end
|
1241
|
+
#
|
1242
|
+
def update_rag_engine_config request, options = nil
|
1243
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1244
|
+
|
1245
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest
|
1246
|
+
|
1247
|
+
# Converts hash and nil to an options object
|
1248
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1249
|
+
|
1250
|
+
# Customize the options with defaults
|
1251
|
+
metadata = @config.rpcs.update_rag_engine_config.metadata.to_h
|
1252
|
+
|
1253
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1254
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1255
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1256
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
1257
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1258
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1259
|
+
|
1260
|
+
header_params = {}
|
1261
|
+
if request.rag_engine_config&.name
|
1262
|
+
header_params["rag_engine_config.name"] = request.rag_engine_config.name
|
1263
|
+
end
|
1264
|
+
|
1265
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1266
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1267
|
+
|
1268
|
+
options.apply_defaults timeout: @config.rpcs.update_rag_engine_config.timeout,
|
1269
|
+
metadata: metadata,
|
1270
|
+
retry_policy: @config.rpcs.update_rag_engine_config.retry_policy
|
1271
|
+
|
1272
|
+
options.apply_defaults timeout: @config.timeout,
|
1273
|
+
metadata: @config.metadata,
|
1274
|
+
retry_policy: @config.retry_policy
|
1275
|
+
|
1276
|
+
@vertex_rag_data_service_stub.call_rpc :update_rag_engine_config, request, options: options do |response, operation|
|
1277
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
1278
|
+
yield response, operation if block_given?
|
1279
|
+
throw :response, response
|
1280
|
+
end
|
1281
|
+
rescue ::GRPC::BadStatus => e
|
1282
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1283
|
+
end
|
1284
|
+
|
1285
|
+
##
|
1286
|
+
# Gets a RagEngineConfig.
|
1287
|
+
#
|
1288
|
+
# @overload get_rag_engine_config(request, options = nil)
|
1289
|
+
# Pass arguments to `get_rag_engine_config` via a request object, either of type
|
1290
|
+
# {::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest} or an equivalent Hash.
|
1291
|
+
#
|
1292
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest, ::Hash]
|
1293
|
+
# A request object representing the call parameters. Required. To specify no
|
1294
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1295
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1296
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
1297
|
+
#
|
1298
|
+
# @overload get_rag_engine_config(name: nil)
|
1299
|
+
# Pass arguments to `get_rag_engine_config` via keyword arguments. Note that at
|
1300
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1301
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1302
|
+
#
|
1303
|
+
# @param name [::String]
|
1304
|
+
# Required. The name of the RagEngineConfig resource.
|
1305
|
+
# Format:
|
1306
|
+
# `projects/{project}/locations/{location}/ragEngineConfig`
|
1307
|
+
#
|
1308
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
1309
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::RagEngineConfig]
|
1310
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
1311
|
+
#
|
1312
|
+
# @return [::Google::Cloud::AIPlatform::V1::RagEngineConfig]
|
1313
|
+
#
|
1314
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
1315
|
+
#
|
1316
|
+
# @example Basic example
|
1317
|
+
# require "google/cloud/ai_platform/v1"
|
1318
|
+
#
|
1319
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1320
|
+
# client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Client.new
|
1321
|
+
#
|
1322
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1323
|
+
# request = Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest.new
|
1324
|
+
#
|
1325
|
+
# # Call the get_rag_engine_config method.
|
1326
|
+
# result = client.get_rag_engine_config request
|
1327
|
+
#
|
1328
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::RagEngineConfig.
|
1329
|
+
# p result
|
1330
|
+
#
|
1331
|
+
def get_rag_engine_config request, options = nil
|
1332
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1333
|
+
|
1334
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest
|
1335
|
+
|
1336
|
+
# Converts hash and nil to an options object
|
1337
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1338
|
+
|
1339
|
+
# Customize the options with defaults
|
1340
|
+
metadata = @config.rpcs.get_rag_engine_config.metadata.to_h
|
1341
|
+
|
1342
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1343
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1344
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1345
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
1346
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1347
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1348
|
+
|
1349
|
+
header_params = {}
|
1350
|
+
if request.name
|
1351
|
+
header_params["name"] = request.name
|
1352
|
+
end
|
1353
|
+
|
1354
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
1355
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
1356
|
+
|
1357
|
+
options.apply_defaults timeout: @config.rpcs.get_rag_engine_config.timeout,
|
1358
|
+
metadata: metadata,
|
1359
|
+
retry_policy: @config.rpcs.get_rag_engine_config.retry_policy
|
1360
|
+
|
1361
|
+
options.apply_defaults timeout: @config.timeout,
|
1362
|
+
metadata: @config.metadata,
|
1363
|
+
retry_policy: @config.retry_policy
|
1364
|
+
|
1365
|
+
@vertex_rag_data_service_stub.call_rpc :get_rag_engine_config, request, options: options do |response, operation|
|
1366
|
+
yield response, operation if block_given?
|
1367
|
+
end
|
1368
|
+
rescue ::GRPC::BadStatus => e
|
1369
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1370
|
+
end
|
1371
|
+
|
1188
1372
|
##
|
1189
1373
|
# Configuration class for the VertexRagDataService API.
|
1190
1374
|
#
|
@@ -1401,6 +1585,16 @@ module Google
|
|
1401
1585
|
# @return [::Gapic::Config::Method]
|
1402
1586
|
#
|
1403
1587
|
attr_reader :delete_rag_file
|
1588
|
+
##
|
1589
|
+
# RPC-specific configuration for `update_rag_engine_config`
|
1590
|
+
# @return [::Gapic::Config::Method]
|
1591
|
+
#
|
1592
|
+
attr_reader :update_rag_engine_config
|
1593
|
+
##
|
1594
|
+
# RPC-specific configuration for `get_rag_engine_config`
|
1595
|
+
# @return [::Gapic::Config::Method]
|
1596
|
+
#
|
1597
|
+
attr_reader :get_rag_engine_config
|
1404
1598
|
|
1405
1599
|
# @private
|
1406
1600
|
def initialize parent_rpcs = nil
|
@@ -1424,6 +1618,10 @@ module Google
|
|
1424
1618
|
@list_rag_files = ::Gapic::Config::Method.new list_rag_files_config
|
1425
1619
|
delete_rag_file_config = parent_rpcs.delete_rag_file if parent_rpcs.respond_to? :delete_rag_file
|
1426
1620
|
@delete_rag_file = ::Gapic::Config::Method.new delete_rag_file_config
|
1621
|
+
update_rag_engine_config_config = parent_rpcs.update_rag_engine_config if parent_rpcs.respond_to? :update_rag_engine_config
|
1622
|
+
@update_rag_engine_config = ::Gapic::Config::Method.new update_rag_engine_config_config
|
1623
|
+
get_rag_engine_config_config = parent_rpcs.get_rag_engine_config if parent_rpcs.respond_to? :get_rag_engine_config
|
1624
|
+
@get_rag_engine_config = ::Gapic::Config::Method.new get_rag_engine_config_config
|
1427
1625
|
|
1428
1626
|
yield self if block_given?
|
1429
1627
|
end
|
@@ -124,6 +124,23 @@ module Google
|
|
124
124
|
"projects/#{project}/locations/#{location}/ragCorpora/#{rag_corpus}"
|
125
125
|
end
|
126
126
|
|
127
|
+
##
|
128
|
+
# Create a fully-qualified RagEngineConfig resource string.
|
129
|
+
#
|
130
|
+
# The resource will be in the following format:
|
131
|
+
#
|
132
|
+
# `projects/{project}/locations/{location}/ragEngineConfig`
|
133
|
+
#
|
134
|
+
# @param project [String]
|
135
|
+
# @param location [String]
|
136
|
+
#
|
137
|
+
# @return [::String]
|
138
|
+
def rag_engine_config_path project:, location:
|
139
|
+
raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/"
|
140
|
+
|
141
|
+
"projects/#{project}/locations/#{location}/ragEngineConfig"
|
142
|
+
end
|
143
|
+
|
127
144
|
##
|
128
145
|
# Create a fully-qualified RagFile resource string.
|
129
146
|
#
|
@@ -1110,6 +1110,176 @@ module Google
|
|
1110
1110
|
raise ::Google::Cloud::Error.from_error(e)
|
1111
1111
|
end
|
1112
1112
|
|
1113
|
+
##
|
1114
|
+
# Updates a RagEngineConfig.
|
1115
|
+
#
|
1116
|
+
# @overload update_rag_engine_config(request, options = nil)
|
1117
|
+
# Pass arguments to `update_rag_engine_config` via a request object, either of type
|
1118
|
+
# {::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest} or an equivalent Hash.
|
1119
|
+
#
|
1120
|
+
# @param request [::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest, ::Hash]
|
1121
|
+
# A request object representing the call parameters. Required. To specify no
|
1122
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1123
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1124
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1125
|
+
#
|
1126
|
+
# @overload update_rag_engine_config(rag_engine_config: nil)
|
1127
|
+
# Pass arguments to `update_rag_engine_config` via keyword arguments. Note that at
|
1128
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1129
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1130
|
+
#
|
1131
|
+
# @param rag_engine_config [::Google::Cloud::AIPlatform::V1::RagEngineConfig, ::Hash]
|
1132
|
+
# Required. The updated RagEngineConfig.
|
1133
|
+
#
|
1134
|
+
# NOTE: Downgrading your RagManagedDb's ComputeTier could temporarily
|
1135
|
+
# increase request latencies until the operation is fully complete.
|
1136
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1137
|
+
# @yieldparam result [::Gapic::Operation]
|
1138
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1139
|
+
#
|
1140
|
+
# @return [::Gapic::Operation]
|
1141
|
+
#
|
1142
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1143
|
+
#
|
1144
|
+
# @example Basic example
|
1145
|
+
# require "google/cloud/ai_platform/v1"
|
1146
|
+
#
|
1147
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1148
|
+
# client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Rest::Client.new
|
1149
|
+
#
|
1150
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1151
|
+
# request = Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest.new
|
1152
|
+
#
|
1153
|
+
# # Call the update_rag_engine_config method.
|
1154
|
+
# result = client.update_rag_engine_config request
|
1155
|
+
#
|
1156
|
+
# # The returned object is of type Gapic::Operation. You can use it to
|
1157
|
+
# # check the status of an operation, cancel it, or wait for results.
|
1158
|
+
# # Here is how to wait for a response.
|
1159
|
+
# result.wait_until_done! timeout: 60
|
1160
|
+
# if result.response?
|
1161
|
+
# p result.response
|
1162
|
+
# else
|
1163
|
+
# puts "No response received."
|
1164
|
+
# end
|
1165
|
+
#
|
1166
|
+
def update_rag_engine_config request, options = nil
|
1167
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1168
|
+
|
1169
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateRagEngineConfigRequest
|
1170
|
+
|
1171
|
+
# Converts hash and nil to an options object
|
1172
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1173
|
+
|
1174
|
+
# Customize the options with defaults
|
1175
|
+
call_metadata = @config.rpcs.update_rag_engine_config.metadata.to_h
|
1176
|
+
|
1177
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1178
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1179
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1180
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1181
|
+
transports_version_send: [:rest]
|
1182
|
+
|
1183
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1184
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1185
|
+
|
1186
|
+
options.apply_defaults timeout: @config.rpcs.update_rag_engine_config.timeout,
|
1187
|
+
metadata: call_metadata,
|
1188
|
+
retry_policy: @config.rpcs.update_rag_engine_config.retry_policy
|
1189
|
+
|
1190
|
+
options.apply_defaults timeout: @config.timeout,
|
1191
|
+
metadata: @config.metadata,
|
1192
|
+
retry_policy: @config.retry_policy
|
1193
|
+
|
1194
|
+
@vertex_rag_data_service_stub.update_rag_engine_config request, options do |result, operation|
|
1195
|
+
result = ::Gapic::Operation.new result, @operations_client, options: options
|
1196
|
+
yield result, operation if block_given?
|
1197
|
+
throw :response, result
|
1198
|
+
end
|
1199
|
+
rescue ::Gapic::Rest::Error => e
|
1200
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1201
|
+
end
|
1202
|
+
|
1203
|
+
##
|
1204
|
+
# Gets a RagEngineConfig.
|
1205
|
+
#
|
1206
|
+
# @overload get_rag_engine_config(request, options = nil)
|
1207
|
+
# Pass arguments to `get_rag_engine_config` via a request object, either of type
|
1208
|
+
# {::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest} or an equivalent Hash.
|
1209
|
+
#
|
1210
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest, ::Hash]
|
1211
|
+
# A request object representing the call parameters. Required. To specify no
|
1212
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
1213
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
1214
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
1215
|
+
#
|
1216
|
+
# @overload get_rag_engine_config(name: nil)
|
1217
|
+
# Pass arguments to `get_rag_engine_config` via keyword arguments. Note that at
|
1218
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
1219
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
1220
|
+
#
|
1221
|
+
# @param name [::String]
|
1222
|
+
# Required. The name of the RagEngineConfig resource.
|
1223
|
+
# Format:
|
1224
|
+
# `projects/{project}/locations/{location}/ragEngineConfig`
|
1225
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
1226
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::RagEngineConfig]
|
1227
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
1228
|
+
#
|
1229
|
+
# @return [::Google::Cloud::AIPlatform::V1::RagEngineConfig]
|
1230
|
+
#
|
1231
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
1232
|
+
#
|
1233
|
+
# @example Basic example
|
1234
|
+
# require "google/cloud/ai_platform/v1"
|
1235
|
+
#
|
1236
|
+
# # Create a client object. The client can be reused for multiple calls.
|
1237
|
+
# client = Google::Cloud::AIPlatform::V1::VertexRagDataService::Rest::Client.new
|
1238
|
+
#
|
1239
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
1240
|
+
# request = Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest.new
|
1241
|
+
#
|
1242
|
+
# # Call the get_rag_engine_config method.
|
1243
|
+
# result = client.get_rag_engine_config request
|
1244
|
+
#
|
1245
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::RagEngineConfig.
|
1246
|
+
# p result
|
1247
|
+
#
|
1248
|
+
def get_rag_engine_config request, options = nil
|
1249
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
1250
|
+
|
1251
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetRagEngineConfigRequest
|
1252
|
+
|
1253
|
+
# Converts hash and nil to an options object
|
1254
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
1255
|
+
|
1256
|
+
# Customize the options with defaults
|
1257
|
+
call_metadata = @config.rpcs.get_rag_engine_config.metadata.to_h
|
1258
|
+
|
1259
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
1260
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
1261
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
1262
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
1263
|
+
transports_version_send: [:rest]
|
1264
|
+
|
1265
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
1266
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
1267
|
+
|
1268
|
+
options.apply_defaults timeout: @config.rpcs.get_rag_engine_config.timeout,
|
1269
|
+
metadata: call_metadata,
|
1270
|
+
retry_policy: @config.rpcs.get_rag_engine_config.retry_policy
|
1271
|
+
|
1272
|
+
options.apply_defaults timeout: @config.timeout,
|
1273
|
+
metadata: @config.metadata,
|
1274
|
+
retry_policy: @config.retry_policy
|
1275
|
+
|
1276
|
+
@vertex_rag_data_service_stub.get_rag_engine_config request, options do |result, operation|
|
1277
|
+
yield result, operation if block_given?
|
1278
|
+
end
|
1279
|
+
rescue ::Gapic::Rest::Error => e
|
1280
|
+
raise ::Google::Cloud::Error.from_error(e)
|
1281
|
+
end
|
1282
|
+
|
1113
1283
|
##
|
1114
1284
|
# Configuration class for the VertexRagDataService REST API.
|
1115
1285
|
#
|
@@ -1313,6 +1483,16 @@ module Google
|
|
1313
1483
|
# @return [::Gapic::Config::Method]
|
1314
1484
|
#
|
1315
1485
|
attr_reader :delete_rag_file
|
1486
|
+
##
|
1487
|
+
# RPC-specific configuration for `update_rag_engine_config`
|
1488
|
+
# @return [::Gapic::Config::Method]
|
1489
|
+
#
|
1490
|
+
attr_reader :update_rag_engine_config
|
1491
|
+
##
|
1492
|
+
# RPC-specific configuration for `get_rag_engine_config`
|
1493
|
+
# @return [::Gapic::Config::Method]
|
1494
|
+
#
|
1495
|
+
attr_reader :get_rag_engine_config
|
1316
1496
|
|
1317
1497
|
# @private
|
1318
1498
|
def initialize parent_rpcs = nil
|
@@ -1336,6 +1516,10 @@ module Google
|
|
1336
1516
|
@list_rag_files = ::Gapic::Config::Method.new list_rag_files_config
|
1337
1517
|
delete_rag_file_config = parent_rpcs.delete_rag_file if parent_rpcs.respond_to? :delete_rag_file
|
1338
1518
|
@delete_rag_file = ::Gapic::Config::Method.new delete_rag_file_config
|
1519
|
+
update_rag_engine_config_config = parent_rpcs.update_rag_engine_config if parent_rpcs.respond_to? :update_rag_engine_config
|
1520
|
+
@update_rag_engine_config = ::Gapic::Config::Method.new update_rag_engine_config_config
|
1521
|
+
get_rag_engine_config_config = parent_rpcs.get_rag_engine_config if parent_rpcs.respond_to? :get_rag_engine_config
|
1522
|
+
@get_rag_engine_config = ::Gapic::Config::Method.new get_rag_engine_config_config
|
1339
1523
|
|
1340
1524
|
yield self if block_given?
|
1341
1525
|
end
|