google-cloud-ai_platform-v1 0.28.0 → 0.29.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 379089a4e17a7aaa10e1185ff6bd08fb66f1c87822056b0563961897338eed1c
4
- data.tar.gz: 2a2df950aafcadc946811bd6dcd17c8b57005db2aec2f097cc0653ce91fad6ce
3
+ metadata.gz: feb5a1ea6d2106d041c6c40dbcd256d503edf586b3fb0af80537e8cf87e4f435
4
+ data.tar.gz: 27220fe8c85ffdb47735718a69f149d2179fcab0dfb7b7fa84e598fcd356df13
5
5
  SHA512:
6
- metadata.gz: 156c2df6e81821665e0319d457f475fe6ccd5adb41d90fa8a2cd16fa81cbe9b27af7cb6d847975e931a147450f22de9eaaf256cb299953074af1135b05f51306
7
- data.tar.gz: 3ad2b028dad2f03be9e60f7bcbb214cb0d715b1cd710cc90150e98c011a41f9c2492f7e29e8ad9cd60cb2cbd69f64f27a8e15201f3a1e6359c534b2003dd4fd4
6
+ metadata.gz: c61c61245aef652a959dbdcaa716da7bc504e3e947b1417dfa3f80b51ead053f446b735b9a6ec4dae4f0d3195c7161d4e604df8d54ed6db5a3805a993ba0fc93
7
+ data.tar.gz: 85efd35cb73a5c4d6102f8659201db0ed7106d71f1a144d4f20d06c74e28164b2c8d5e2e0a649de13ecc848eed64d15da3ca74ead1d57982892b2ab482f4ad11
@@ -388,6 +388,101 @@ module Google
388
388
  raise ::Google::Cloud::Error.from_error(e)
389
389
  end
390
390
 
391
+ ##
392
+ # Perform a server-side streaming online prediction request for Vertex
393
+ # LLM streaming.
394
+ #
395
+ # @overload server_streaming_predict(request, options = nil)
396
+ # Pass arguments to `server_streaming_predict` via a request object, either of type
397
+ # {::Google::Cloud::AIPlatform::V1::StreamingPredictRequest} or an equivalent Hash.
398
+ #
399
+ # @param request [::Google::Cloud::AIPlatform::V1::StreamingPredictRequest, ::Hash]
400
+ # A request object representing the call parameters. Required. To specify no
401
+ # parameters, or to keep all the default parameter values, pass an empty Hash.
402
+ # @param options [::Gapic::CallOptions, ::Hash]
403
+ # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
404
+ #
405
+ # @overload server_streaming_predict(endpoint: nil, inputs: nil, parameters: nil)
406
+ # Pass arguments to `server_streaming_predict` via keyword arguments. Note that at
407
+ # least one keyword argument is required. To specify no parameters, or to keep all
408
+ # the default parameter values, pass an empty Hash as a request object (see above).
409
+ #
410
+ # @param endpoint [::String]
411
+ # Required. The name of the Endpoint requested to serve the prediction.
412
+ # Format:
413
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
414
+ # @param inputs [::Array<::Google::Cloud::AIPlatform::V1::Tensor, ::Hash>]
415
+ # The prediction input.
416
+ # @param parameters [::Google::Cloud::AIPlatform::V1::Tensor, ::Hash]
417
+ # The parameters that govern the prediction.
418
+ #
419
+ # @yield [response, operation] Access the result along with the RPC operation
420
+ # @yieldparam response [::Enumerable<::Google::Cloud::AIPlatform::V1::StreamingPredictResponse>]
421
+ # @yieldparam operation [::GRPC::ActiveCall::Operation]
422
+ #
423
+ # @return [::Enumerable<::Google::Cloud::AIPlatform::V1::StreamingPredictResponse>]
424
+ #
425
+ # @raise [::Google::Cloud::Error] if the RPC is aborted.
426
+ #
427
+ # @example Basic example
428
+ # require "google/cloud/ai_platform/v1"
429
+ #
430
+ # # Create a client object. The client can be reused for multiple calls.
431
+ # client = Google::Cloud::AIPlatform::V1::PredictionService::Client.new
432
+ #
433
+ # # Create a request. To set request fields, pass in keyword arguments.
434
+ # request = Google::Cloud::AIPlatform::V1::StreamingPredictRequest.new
435
+ #
436
+ # # Call the server_streaming_predict method to start streaming.
437
+ # output = client.server_streaming_predict request
438
+ #
439
+ # # The returned object is a streamed enumerable yielding elements of type
440
+ # # ::Google::Cloud::AIPlatform::V1::StreamingPredictResponse
441
+ # output.each do |current_response|
442
+ # p current_response
443
+ # end
444
+ #
445
+ def server_streaming_predict request, options = nil
446
+ raise ::ArgumentError, "request must be provided" if request.nil?
447
+
448
+ request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::StreamingPredictRequest
449
+
450
+ # Converts hash and nil to an options object
451
+ options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
452
+
453
+ # Customize the options with defaults
454
+ metadata = @config.rpcs.server_streaming_predict.metadata.to_h
455
+
456
+ # Set x-goog-api-client and x-goog-user-project headers
457
+ metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
458
+ lib_name: @config.lib_name, lib_version: @config.lib_version,
459
+ gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
460
+ metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
461
+
462
+ header_params = {}
463
+ if request.endpoint
464
+ header_params["endpoint"] = request.endpoint
465
+ end
466
+
467
+ request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
468
+ metadata[:"x-goog-request-params"] ||= request_params_header
469
+
470
+ options.apply_defaults timeout: @config.rpcs.server_streaming_predict.timeout,
471
+ metadata: metadata,
472
+ retry_policy: @config.rpcs.server_streaming_predict.retry_policy
473
+
474
+ options.apply_defaults timeout: @config.timeout,
475
+ metadata: @config.metadata,
476
+ retry_policy: @config.retry_policy
477
+
478
+ @prediction_service_stub.call_rpc :server_streaming_predict, request, options: options do |response, operation|
479
+ yield response, operation if block_given?
480
+ return response
481
+ end
482
+ rescue ::GRPC::BadStatus => e
483
+ raise ::Google::Cloud::Error.from_error(e)
484
+ end
485
+
391
486
  ##
392
487
  # Perform an online explanation.
393
488
  #
@@ -662,6 +757,11 @@ module Google
662
757
  #
663
758
  attr_reader :raw_predict
664
759
  ##
760
+ # RPC-specific configuration for `server_streaming_predict`
761
+ # @return [::Gapic::Config::Method]
762
+ #
763
+ attr_reader :server_streaming_predict
764
+ ##
665
765
  # RPC-specific configuration for `explain`
666
766
  # @return [::Gapic::Config::Method]
667
767
  #
@@ -673,6 +773,8 @@ module Google
673
773
  @predict = ::Gapic::Config::Method.new predict_config
674
774
  raw_predict_config = parent_rpcs.raw_predict if parent_rpcs.respond_to? :raw_predict
675
775
  @raw_predict = ::Gapic::Config::Method.new raw_predict_config
776
+ server_streaming_predict_config = parent_rpcs.server_streaming_predict if parent_rpcs.respond_to? :server_streaming_predict
777
+ @server_streaming_predict = ::Gapic::Config::Method.new server_streaming_predict_config
676
778
  explain_config = parent_rpcs.explain if parent_rpcs.respond_to? :explain
677
779
  @explain = ::Gapic::Config::Method.new explain_config
678
780
 
@@ -21,7 +21,7 @@ module Google
21
21
  module Cloud
22
22
  module AIPlatform
23
23
  module V1
24
- VERSION = "0.28.0"
24
+ VERSION = "0.29.0"
25
25
  end
26
26
  end
27
27
  end
@@ -10,10 +10,11 @@ require 'google/api/field_behavior_pb'
10
10
  require 'google/api/httpbody_pb'
11
11
  require 'google/api/resource_pb'
12
12
  require 'google/cloud/aiplatform/v1/explanation_pb'
13
+ require 'google/cloud/aiplatform/v1/types_pb'
13
14
  require 'google/protobuf/struct_pb'
14
15
 
15
16
 
16
- descriptor_data = "\n3google/cloud/aiplatform/v1/prediction_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xaa\x01\n\x0ePredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x03 \x01(\x0b\x32\x16.google.protobuf.Value\"\xd1\x01\n\x0fPredictResponse\x12+\n\x0bpredictions\x18\x01 \x03(\x0b\x32\x16.google.protobuf.Value\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12\x36\n\x05model\x18\x03 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12model_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\"z\n\x11RawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\x9d\x02\n\x0e\x45xplainRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x04 \x01(\x0b\x32\x16.google.protobuf.Value\x12V\n\x19\x65xplanation_spec_override\x18\x05 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.ExplanationSpecOverride\x12\x19\n\x11\x64\x65ployed_model_id\x18\x03 \x01(\t\"\x98\x01\n\x0f\x45xplainResponse\x12=\n\x0c\x65xplanations\x18\x01 \x03(\x0b\x32\'.google.cloud.aiplatform.v1.Explanation\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12+\n\x0bpredictions\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value2\xd7\x06\n\x11PredictionService\x12\x94\x02\n\x07Predict\x12*.google.cloud.aiplatform.v1.PredictRequest\x1a+.google.cloud.aiplatform.v1.PredictResponse\"\xaf\x01\x82\xd3\xe4\x93\x02\x88\x01\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict:\x01*ZH\"C/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict:\x01*\xda\x41\x1d\x65ndpoint,instances,parameters\x12\xfe\x01\n\nRawPredict\x12-.google.cloud.aiplatform.v1.RawPredictRequest\x1a\x14.google.api.HttpBody\"\xaa\x01\x82\xd3\xe4\x93\x02\x8e\x01\"</v1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict:\x01*ZK\"F/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict:\x01*\xda\x41\x12\x65ndpoint,http_body\x12\xda\x01\n\x07\x45xplain\x12*.google.cloud.aiplatform.v1.ExplainRequest\x1a+.google.cloud.aiplatform.v1.ExplainResponse\"v\x82\xd3\xe4\x93\x02>\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain:\x01*\xda\x41/endpoint,instances,parameters,deployed_model_id\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd4\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x16PredictionServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
17
+ descriptor_data = "\n3google/cloud/aiplatform/v1/prediction_service.proto\x12\x1agoogle.cloud.aiplatform.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/httpbody.proto\x1a\x19google/api/resource.proto\x1a,google/cloud/aiplatform/v1/explanation.proto\x1a&google/cloud/aiplatform/v1/types.proto\x1a\x1cgoogle/protobuf/struct.proto\"\xaa\x01\n\x0ePredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x03 \x01(\x0b\x32\x16.google.protobuf.Value\"\x80\x02\n\x0fPredictResponse\x12+\n\x0bpredictions\x18\x01 \x03(\x0b\x32\x16.google.protobuf.Value\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12\x36\n\x05model\x18\x03 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x61iplatform.googleapis.com/Model\x12\x1d\n\x10model_version_id\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x1f\n\x12model_display_name\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12-\n\x08metadata\x18\x06 \x01(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x03\"z\n\x11RawPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\'\n\thttp_body\x18\x02 \x01(\x0b\x32\x14.google.api.HttpBody\"\xc3\x01\n\x17StreamingPredictRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12\x32\n\x06inputs\x18\x02 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x03 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x87\x01\n\x18StreamingPredictResponse\x12\x33\n\x07outputs\x18\x01 \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x36\n\nparameters\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\"\x9d\x02\n\x0e\x45xplainRequest\x12<\n\x08\x65ndpoint\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"aiplatform.googleapis.com/Endpoint\x12.\n\tinstances\x18\x02 \x03(\x0b\x32\x16.google.protobuf.ValueB\x03\xe0\x41\x02\x12*\n\nparameters\x18\x04 \x01(\x0b\x32\x16.google.protobuf.Value\x12V\n\x19\x65xplanation_spec_override\x18\x05 \x01(\x0b\x32\x33.google.cloud.aiplatform.v1.ExplanationSpecOverride\x12\x19\n\x11\x64\x65ployed_model_id\x18\x03 \x01(\t\"\x98\x01\n\x0f\x45xplainResponse\x12=\n\x0c\x65xplanations\x18\x01 \x03(\x0b\x32\'.google.cloud.aiplatform.v1.Explanation\x12\x19\n\x11\x64\x65ployed_model_id\x18\x02 \x01(\t\x12+\n\x0bpredictions\x18\x03 \x03(\x0b\x32\x16.google.protobuf.Value2\x8f\t\n\x11PredictionService\x12\x94\x02\n\x07Predict\x12*.google.cloud.aiplatform.v1.PredictRequest\x1a+.google.cloud.aiplatform.v1.PredictResponse\"\xaf\x01\x82\xd3\xe4\x93\x02\x88\x01\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:predict:\x01*ZH\"C/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:predict:\x01*\xda\x41\x1d\x65ndpoint,instances,parameters\x12\xfe\x01\n\nRawPredict\x12-.google.cloud.aiplatform.v1.RawPredictRequest\x1a\x14.google.api.HttpBody\"\xaa\x01\x82\xd3\xe4\x93\x02\x8e\x01\"</v1/{endpoint=projects/*/locations/*/endpoints/*}:rawPredict:\x01*ZK\"F/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:rawPredict:\x01*\xda\x41\x12\x65ndpoint,http_body\x12\xb5\x02\n\x16ServerStreamingPredict\x12\x33.google.cloud.aiplatform.v1.StreamingPredictRequest\x1a\x34.google.cloud.aiplatform.v1.StreamingPredictResponse\"\xad\x01\x82\xd3\xe4\x93\x02\xa6\x01\"H/v1/{endpoint=projects/*/locations/*/endpoints/*}:serverStreamingPredict:\x01*ZW\"R/v1/{endpoint=projects/*/locations/*/publishers/*/models/*}:serverStreamingPredict:\x01*0\x01\x12\xda\x01\n\x07\x45xplain\x12*.google.cloud.aiplatform.v1.ExplainRequest\x1a+.google.cloud.aiplatform.v1.ExplainResponse\"v\x82\xd3\xe4\x93\x02>\"9/v1/{endpoint=projects/*/locations/*/endpoints/*}:explain:\x01*\xda\x41/endpoint,instances,parameters,deployed_model_id\x1aM\xca\x41\x19\x61iplatform.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xd4\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\x16PredictionServiceProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
17
18
 
18
19
  pool = Google::Protobuf::DescriptorPool.generated_pool
19
20
 
@@ -30,6 +31,7 @@ rescue TypeError => e
30
31
  imports = [
31
32
  ["google.protobuf.Value", "google/protobuf/struct.proto"],
32
33
  ["google.api.HttpBody", "google/api/httpbody.proto"],
34
+ ["google.cloud.aiplatform.v1.Tensor", "google/cloud/aiplatform/v1/types.proto"],
33
35
  ["google.cloud.aiplatform.v1.ExplanationSpecOverride", "google/cloud/aiplatform/v1/explanation.proto"],
34
36
  ]
35
37
  imports.each do |type_name, expected_filename|
@@ -49,6 +51,8 @@ module Google
49
51
  PredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PredictRequest").msgclass
50
52
  PredictResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.PredictResponse").msgclass
51
53
  RawPredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.RawPredictRequest").msgclass
54
+ StreamingPredictRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.StreamingPredictRequest").msgclass
55
+ StreamingPredictResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.StreamingPredictResponse").msgclass
52
56
  ExplainRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ExplainRequest").msgclass
53
57
  ExplainResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.ExplainResponse").msgclass
54
58
  end
@@ -47,6 +47,9 @@ module Google
47
47
  # [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] that served this
48
48
  # prediction.
49
49
  rpc :RawPredict, ::Google::Cloud::AIPlatform::V1::RawPredictRequest, ::Google::Api::HttpBody
50
+ # Perform a server-side streaming online prediction request for Vertex
51
+ # LLM streaming.
52
+ rpc :ServerStreamingPredict, ::Google::Cloud::AIPlatform::V1::StreamingPredictRequest, stream(::Google::Cloud::AIPlatform::V1::StreamingPredictResponse)
50
53
  # Perform an online explanation.
51
54
  #
52
55
  # If
@@ -5,7 +5,7 @@
5
5
  require 'google/protobuf'
6
6
 
7
7
 
8
- descriptor_data = "\n&google/cloud/aiplatform/v1/types.proto\x12\x1agoogle.cloud.aiplatform.v1\"\x1b\n\tBoolArray\x12\x0e\n\x06values\x18\x01 \x03(\x08\"\x1d\n\x0b\x44oubleArray\x12\x0e\n\x06values\x18\x01 \x03(\x01\"\x1c\n\nInt64Array\x12\x0e\n\x06values\x18\x01 \x03(\x03\"\x1d\n\x0bStringArray\x12\x0e\n\x06values\x18\x01 \x03(\tB\xc8\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\nTypesProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
8
+ descriptor_data = "\n&google/cloud/aiplatform/v1/types.proto\x12\x1agoogle.cloud.aiplatform.v1\"\x1b\n\tBoolArray\x12\x0e\n\x06values\x18\x01 \x03(\x08\"\x1d\n\x0b\x44oubleArray\x12\x0e\n\x06values\x18\x01 \x03(\x01\"\x1c\n\nInt64Array\x12\x0e\n\x06values\x18\x01 \x03(\x03\"\x1d\n\x0bStringArray\x12\x0e\n\x06values\x18\x01 \x03(\t\"\x93\x05\n\x06Tensor\x12:\n\x05\x64type\x18\x01 \x01(\x0e\x32+.google.cloud.aiplatform.v1.Tensor.DataType\x12\r\n\x05shape\x18\x02 \x03(\x03\x12\x10\n\x08\x62ool_val\x18\x03 \x03(\x08\x12\x12\n\nstring_val\x18\x0e \x03(\t\x12\x11\n\tbytes_val\x18\x0f \x03(\x0c\x12\x11\n\tfloat_val\x18\x05 \x03(\x02\x12\x12\n\ndouble_val\x18\x06 \x03(\x01\x12\x0f\n\x07int_val\x18\x07 \x03(\x05\x12\x11\n\tint64_val\x18\x08 \x03(\x03\x12\x10\n\x08uint_val\x18\t \x03(\r\x12\x12\n\nuint64_val\x18\n \x03(\x04\x12\x34\n\x08list_val\x18\x0b \x03(\x0b\x32\".google.cloud.aiplatform.v1.Tensor\x12\x45\n\nstruct_val\x18\x0c \x03(\x0b\x32\x31.google.cloud.aiplatform.v1.Tensor.StructValEntry\x12\x12\n\ntensor_val\x18\r \x01(\x0c\x1aT\n\x0eStructValEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x31\n\x05value\x18\x02 \x01(\x0b\x32\".google.cloud.aiplatform.v1.Tensor:\x02\x38\x01\"\xac\x01\n\x08\x44\x61taType\x12\x19\n\x15\x44\x41TA_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04\x42OOL\x10\x01\x12\n\n\x06STRING\x10\x02\x12\t\n\x05\x46LOAT\x10\x03\x12\n\n\x06\x44OUBLE\x10\x04\x12\x08\n\x04INT8\x10\x05\x12\t\n\x05INT16\x10\x06\x12\t\n\x05INT32\x10\x07\x12\t\n\x05INT64\x10\x08\x12\t\n\x05UINT8\x10\t\x12\n\n\x06UINT16\x10\n\x12\n\n\x06UINT32\x10\x0b\x12\n\n\x06UINT64\x10\x0c\x42\xc8\x01\n\x1e\x63om.google.cloud.aiplatform.v1B\nTypesProtoP\x01Z>cloud.google.com/go/aiplatform/apiv1/aiplatformpb;aiplatformpb\xaa\x02\x1aGoogle.Cloud.AIPlatform.V1\xca\x02\x1aGoogle\\Cloud\\AIPlatform\\V1\xea\x02\x1dGoogle::Cloud::AIPlatform::V1b\x06proto3"
9
9
 
10
10
  pool = Google::Protobuf::DescriptorPool.generated_pool
11
11
 
@@ -39,6 +39,8 @@ module Google
39
39
  DoubleArray = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.DoubleArray").msgclass
40
40
  Int64Array = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Int64Array").msgclass
41
41
  StringArray = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.StringArray").msgclass
42
+ Tensor = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tensor").msgclass
43
+ Tensor::DataType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.aiplatform.v1.Tensor.DataType").enummodule
42
44
  end
43
45
  end
44
46
  end
@@ -76,6 +76,10 @@ module Google
76
76
  # Output only. The [display
77
77
  # name][google.cloud.aiplatform.v1.Model.display_name] of the Model which is
78
78
  # deployed as the DeployedModel that this prediction hits.
79
+ # @!attribute [r] metadata
80
+ # @return [::Google::Protobuf::Value]
81
+ # Output only. Request-level metadata returned by the model. The metadata
82
+ # type will be dependent upon the model implementation.
79
83
  class PredictResponse
80
84
  include ::Google::Protobuf::MessageExts
81
85
  extend ::Google::Protobuf::MessageExts::ClassMethods
@@ -110,6 +114,41 @@ module Google
110
114
  extend ::Google::Protobuf::MessageExts::ClassMethods
111
115
  end
112
116
 
117
+ # Request message for
118
+ # [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict].
119
+ #
120
+ # The first message must contain
121
+ # {::Google::Cloud::AIPlatform::V1::StreamingPredictRequest#endpoint endpoint} field
122
+ # and optionally [input][]. The subsequent messages must contain [input][].
123
+ # @!attribute [rw] endpoint
124
+ # @return [::String]
125
+ # Required. The name of the Endpoint requested to serve the prediction.
126
+ # Format:
127
+ # `projects/{project}/locations/{location}/endpoints/{endpoint}`
128
+ # @!attribute [rw] inputs
129
+ # @return [::Array<::Google::Cloud::AIPlatform::V1::Tensor>]
130
+ # The prediction input.
131
+ # @!attribute [rw] parameters
132
+ # @return [::Google::Cloud::AIPlatform::V1::Tensor]
133
+ # The parameters that govern the prediction.
134
+ class StreamingPredictRequest
135
+ include ::Google::Protobuf::MessageExts
136
+ extend ::Google::Protobuf::MessageExts::ClassMethods
137
+ end
138
+
139
+ # Response message for
140
+ # [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict].
141
+ # @!attribute [rw] outputs
142
+ # @return [::Array<::Google::Cloud::AIPlatform::V1::Tensor>]
143
+ # The prediction output.
144
+ # @!attribute [rw] parameters
145
+ # @return [::Google::Cloud::AIPlatform::V1::Tensor]
146
+ # The parameters that govern the prediction.
147
+ class StreamingPredictResponse
148
+ include ::Google::Protobuf::MessageExts
149
+ extend ::Google::Protobuf::MessageExts::ClassMethods
150
+ end
151
+
113
152
  # Request message for
114
153
  # {::Google::Cloud::AIPlatform::V1::PredictionService::Client#explain PredictionService.Explain}.
115
154
  # @!attribute [rw] endpoint
@@ -56,6 +56,105 @@ module Google
56
56
  include ::Google::Protobuf::MessageExts
57
57
  extend ::Google::Protobuf::MessageExts::ClassMethods
58
58
  end
59
+
60
+ # A tensor value type.
61
+ # @!attribute [rw] dtype
62
+ # @return [::Google::Cloud::AIPlatform::V1::Tensor::DataType]
63
+ # The data type of tensor.
64
+ # @!attribute [rw] shape
65
+ # @return [::Array<::Integer>]
66
+ # Shape of the tensor.
67
+ # @!attribute [rw] bool_val
68
+ # @return [::Array<::Boolean>]
69
+ # Type specific representations that make it easy to create tensor protos in
70
+ # all languages. Only the representation corresponding to "dtype" can
71
+ # be set. The values hold the flattened representation of the tensor in
72
+ # row major order.
73
+ #
74
+ # [BOOL][google.aiplatform.master.Tensor.DataType.BOOL]
75
+ # @!attribute [rw] string_val
76
+ # @return [::Array<::String>]
77
+ # [STRING][google.aiplatform.master.Tensor.DataType.STRING]
78
+ # @!attribute [rw] bytes_val
79
+ # @return [::Array<::String>]
80
+ # [STRING][google.aiplatform.master.Tensor.DataType.STRING]
81
+ # @!attribute [rw] float_val
82
+ # @return [::Array<::Float>]
83
+ # [FLOAT][google.aiplatform.master.Tensor.DataType.FLOAT]
84
+ # @!attribute [rw] double_val
85
+ # @return [::Array<::Float>]
86
+ # [DOUBLE][google.aiplatform.master.Tensor.DataType.DOUBLE]
87
+ # @!attribute [rw] int_val
88
+ # @return [::Array<::Integer>]
89
+ # [INT_8][google.aiplatform.master.Tensor.DataType.INT8]
90
+ # [INT_16][google.aiplatform.master.Tensor.DataType.INT16]
91
+ # [INT_32][google.aiplatform.master.Tensor.DataType.INT32]
92
+ # @!attribute [rw] int64_val
93
+ # @return [::Array<::Integer>]
94
+ # [INT64][google.aiplatform.master.Tensor.DataType.INT64]
95
+ # @!attribute [rw] uint_val
96
+ # @return [::Array<::Integer>]
97
+ # [UINT8][google.aiplatform.master.Tensor.DataType.UINT8]
98
+ # [UINT16][google.aiplatform.master.Tensor.DataType.UINT16]
99
+ # [UINT32][google.aiplatform.master.Tensor.DataType.UINT32]
100
+ # @!attribute [rw] uint64_val
101
+ # @return [::Array<::Integer>]
102
+ # [UINT64][google.aiplatform.master.Tensor.DataType.UINT64]
103
+ # @!attribute [rw] list_val
104
+ # @return [::Array<::Google::Cloud::AIPlatform::V1::Tensor>]
105
+ # A list of tensor values.
106
+ # @!attribute [rw] struct_val
107
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::AIPlatform::V1::Tensor}]
108
+ # A map of string to tensor.
109
+ # @!attribute [rw] tensor_val
110
+ # @return [::String]
111
+ # Serialized raw tensor content.
112
+ class Tensor
113
+ include ::Google::Protobuf::MessageExts
114
+ extend ::Google::Protobuf::MessageExts::ClassMethods
115
+
116
+ # @!attribute [rw] key
117
+ # @return [::String]
118
+ # @!attribute [rw] value
119
+ # @return [::Google::Cloud::AIPlatform::V1::Tensor]
120
+ class StructValEntry
121
+ include ::Google::Protobuf::MessageExts
122
+ extend ::Google::Protobuf::MessageExts::ClassMethods
123
+ end
124
+
125
+ # Data type of the tensor.
126
+ module DataType
127
+ # Not a legal value for DataType. Used to indicate a DataType field has not
128
+ # been set.
129
+ DATA_TYPE_UNSPECIFIED = 0
130
+
131
+ # Data types that all computation devices are expected to be
132
+ # capable to support.
133
+ BOOL = 1
134
+
135
+ STRING = 2
136
+
137
+ FLOAT = 3
138
+
139
+ DOUBLE = 4
140
+
141
+ INT8 = 5
142
+
143
+ INT16 = 6
144
+
145
+ INT32 = 7
146
+
147
+ INT64 = 8
148
+
149
+ UINT8 = 9
150
+
151
+ UINT16 = 10
152
+
153
+ UINT32 = 11
154
+
155
+ UINT64 = 12
156
+ end
157
+ end
59
158
  end
60
159
  end
61
160
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-cloud-ai_platform-v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.28.0
4
+ version: 0.29.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-25 00:00:00.000000000 Z
11
+ date: 2023-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gapic-common