google-cloud-ai_platform-v1 1.29.0 → 1.30.1
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/data_foundry_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/deployment_resource_pool_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/evaluation_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/feature_online_store_admin_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/feature_online_store_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/feature_registry_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/gen_ai_cache_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/gen_ai_tuning_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/index_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/job_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/llm_utility_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/match_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/model_garden_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/model_garden_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/model_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/notebook_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/notebook_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/persistent_resource_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +126 -3
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/client.rb +99 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/rest/service_stub.rb +62 -0
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_execution_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/reasoning_engine_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/schedule_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/schedule_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/version.rb +1 -1
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/vertex_rag_data_service/operations.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/vertex_rag_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +20 -3
- data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +20 -3
- data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +7 -1
- data/lib/google/cloud/aiplatform/v1/prediction_service_services_pb.rb +2 -0
- data/lib/google/cloud/aiplatform/v1/usage_metadata_pb.rb +47 -0
- data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +84 -0
- data/proto_docs/google/cloud/aiplatform/v1/usage_metadata.rb +91 -0
- metadata +3 -1
|
@@ -650,8 +650,6 @@ module Google
|
|
|
650
650
|
# @return [::String,nil]
|
|
651
651
|
# @!attribute [rw] credentials
|
|
652
652
|
# Credentials to send with calls. You may provide any of the following types:
|
|
653
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
654
|
-
# * (`Hash`) A service account key as a Hash
|
|
655
653
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
656
654
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
657
655
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -660,7 +658,26 @@ module Google
|
|
|
660
658
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
661
659
|
# * (`nil`) indicating no credentials
|
|
662
660
|
#
|
|
663
|
-
# Warning:
|
|
661
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
662
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
663
|
+
# Google APIs can compromise the security of your systems and data.
|
|
664
|
+
#
|
|
665
|
+
# @example
|
|
666
|
+
#
|
|
667
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
668
|
+
# # on the appropriate credentials class for your environment.
|
|
669
|
+
#
|
|
670
|
+
# require "googleauth"
|
|
671
|
+
#
|
|
672
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
673
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
674
|
+
# )
|
|
675
|
+
#
|
|
676
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
677
|
+
# config.credentials = credentials
|
|
678
|
+
# end
|
|
679
|
+
#
|
|
680
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
664
681
|
# external source for authentication to Google Cloud, you must validate it before
|
|
665
682
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
666
683
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -2220,8 +2220,6 @@ module Google
|
|
|
2220
2220
|
# @return [::String,nil]
|
|
2221
2221
|
# @!attribute [rw] credentials
|
|
2222
2222
|
# Credentials to send with calls. You may provide any of the following types:
|
|
2223
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
2224
|
-
# * (`Hash`) A service account key as a Hash
|
|
2225
2223
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
2226
2224
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
2227
2225
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -2230,7 +2228,26 @@ module Google
|
|
|
2230
2228
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
2231
2229
|
# * (`nil`) indicating no credentials
|
|
2232
2230
|
#
|
|
2233
|
-
# Warning:
|
|
2231
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
2232
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
2233
|
+
# Google APIs can compromise the security of your systems and data.
|
|
2234
|
+
#
|
|
2235
|
+
# @example
|
|
2236
|
+
#
|
|
2237
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
2238
|
+
# # on the appropriate credentials class for your environment.
|
|
2239
|
+
#
|
|
2240
|
+
# require "googleauth"
|
|
2241
|
+
#
|
|
2242
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
2243
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
2244
|
+
# )
|
|
2245
|
+
#
|
|
2246
|
+
# client = ::Google::Cloud::AIPlatform::V1::ModelService::Client.new do |config|
|
|
2247
|
+
# config.credentials = credentials
|
|
2248
|
+
# end
|
|
2249
|
+
#
|
|
2250
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
2234
2251
|
# external source for authentication to Google Cloud, you must validate it before
|
|
2235
2252
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
2236
2253
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -650,8 +650,6 @@ module Google
|
|
|
650
650
|
# @return [::String,nil]
|
|
651
651
|
# @!attribute [rw] credentials
|
|
652
652
|
# Credentials to send with calls. You may provide any of the following types:
|
|
653
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
654
|
-
# * (`Hash`) A service account key as a Hash
|
|
655
653
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
656
654
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
657
655
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -660,7 +658,26 @@ module Google
|
|
|
660
658
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
661
659
|
# * (`nil`) indicating no credentials
|
|
662
660
|
#
|
|
663
|
-
# Warning:
|
|
661
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
662
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
663
|
+
# Google APIs can compromise the security of your systems and data.
|
|
664
|
+
#
|
|
665
|
+
# @example
|
|
666
|
+
#
|
|
667
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
668
|
+
# # on the appropriate credentials class for your environment.
|
|
669
|
+
#
|
|
670
|
+
# require "googleauth"
|
|
671
|
+
#
|
|
672
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
673
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
674
|
+
# )
|
|
675
|
+
#
|
|
676
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
677
|
+
# config.credentials = credentials
|
|
678
|
+
# end
|
|
679
|
+
#
|
|
680
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
664
681
|
# external source for authentication to Google Cloud, you must validate it before
|
|
665
682
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
666
683
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -1916,8 +1916,6 @@ module Google
|
|
|
1916
1916
|
# @return [::String,nil]
|
|
1917
1917
|
# @!attribute [rw] credentials
|
|
1918
1918
|
# Credentials to send with calls. You may provide any of the following types:
|
|
1919
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
1920
|
-
# * (`Hash`) A service account key as a Hash
|
|
1921
1919
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1922
1920
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1923
1921
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -1926,7 +1924,26 @@ module Google
|
|
|
1926
1924
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1927
1925
|
# * (`nil`) indicating no credentials
|
|
1928
1926
|
#
|
|
1929
|
-
# Warning:
|
|
1927
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
1928
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
1929
|
+
# Google APIs can compromise the security of your systems and data.
|
|
1930
|
+
#
|
|
1931
|
+
# @example
|
|
1932
|
+
#
|
|
1933
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
1934
|
+
# # on the appropriate credentials class for your environment.
|
|
1935
|
+
#
|
|
1936
|
+
# require "googleauth"
|
|
1937
|
+
#
|
|
1938
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
1939
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
1940
|
+
# )
|
|
1941
|
+
#
|
|
1942
|
+
# client = ::Google::Cloud::AIPlatform::V1::NotebookService::Client.new do |config|
|
|
1943
|
+
# config.credentials = credentials
|
|
1944
|
+
# end
|
|
1945
|
+
#
|
|
1946
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1930
1947
|
# external source for authentication to Google Cloud, you must validate it before
|
|
1931
1948
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1932
1949
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -650,8 +650,6 @@ module Google
|
|
|
650
650
|
# @return [::String,nil]
|
|
651
651
|
# @!attribute [rw] credentials
|
|
652
652
|
# Credentials to send with calls. You may provide any of the following types:
|
|
653
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
654
|
-
# * (`Hash`) A service account key as a Hash
|
|
655
653
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
656
654
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
657
655
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -660,7 +658,26 @@ module Google
|
|
|
660
658
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
661
659
|
# * (`nil`) indicating no credentials
|
|
662
660
|
#
|
|
663
|
-
# Warning:
|
|
661
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
662
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
663
|
+
# Google APIs can compromise the security of your systems and data.
|
|
664
|
+
#
|
|
665
|
+
# @example
|
|
666
|
+
#
|
|
667
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
668
|
+
# # on the appropriate credentials class for your environment.
|
|
669
|
+
#
|
|
670
|
+
# require "googleauth"
|
|
671
|
+
#
|
|
672
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
673
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
674
|
+
# )
|
|
675
|
+
#
|
|
676
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
677
|
+
# config.credentials = credentials
|
|
678
|
+
# end
|
|
679
|
+
#
|
|
680
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
664
681
|
# external source for authentication to Google Cloud, you must validate it before
|
|
665
682
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
666
683
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -846,8 +846,6 @@ module Google
|
|
|
846
846
|
# @return [::String,nil]
|
|
847
847
|
# @!attribute [rw] credentials
|
|
848
848
|
# Credentials to send with calls. You may provide any of the following types:
|
|
849
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
850
|
-
# * (`Hash`) A service account key as a Hash
|
|
851
849
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
852
850
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
853
851
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -856,7 +854,26 @@ module Google
|
|
|
856
854
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
857
855
|
# * (`nil`) indicating no credentials
|
|
858
856
|
#
|
|
859
|
-
# Warning:
|
|
857
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
858
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
859
|
+
# Google APIs can compromise the security of your systems and data.
|
|
860
|
+
#
|
|
861
|
+
# @example
|
|
862
|
+
#
|
|
863
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
864
|
+
# # on the appropriate credentials class for your environment.
|
|
865
|
+
#
|
|
866
|
+
# require "googleauth"
|
|
867
|
+
#
|
|
868
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
869
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
870
|
+
# )
|
|
871
|
+
#
|
|
872
|
+
# client = ::Google::Cloud::AIPlatform::V1::PersistentResourceService::Client.new do |config|
|
|
873
|
+
# config.credentials = credentials
|
|
874
|
+
# end
|
|
875
|
+
#
|
|
876
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
860
877
|
# external source for authentication to Google Cloud, you must validate it before
|
|
861
878
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
862
879
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -650,8 +650,6 @@ module Google
|
|
|
650
650
|
# @return [::String,nil]
|
|
651
651
|
# @!attribute [rw] credentials
|
|
652
652
|
# Credentials to send with calls. You may provide any of the following types:
|
|
653
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
654
|
-
# * (`Hash`) A service account key as a Hash
|
|
655
653
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
656
654
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
657
655
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -660,7 +658,26 @@ module Google
|
|
|
660
658
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
661
659
|
# * (`nil`) indicating no credentials
|
|
662
660
|
#
|
|
663
|
-
# Warning:
|
|
661
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
662
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
663
|
+
# Google APIs can compromise the security of your systems and data.
|
|
664
|
+
#
|
|
665
|
+
# @example
|
|
666
|
+
#
|
|
667
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
668
|
+
# # on the appropriate credentials class for your environment.
|
|
669
|
+
#
|
|
670
|
+
# require "googleauth"
|
|
671
|
+
#
|
|
672
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
673
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
674
|
+
# )
|
|
675
|
+
#
|
|
676
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
677
|
+
# config.credentials = credentials
|
|
678
|
+
# end
|
|
679
|
+
#
|
|
680
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
664
681
|
# external source for authentication to Google Cloud, you must validate it before
|
|
665
682
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
666
683
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -1499,8 +1499,6 @@ module Google
|
|
|
1499
1499
|
# @return [::String,nil]
|
|
1500
1500
|
# @!attribute [rw] credentials
|
|
1501
1501
|
# Credentials to send with calls. You may provide any of the following types:
|
|
1502
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
1503
|
-
# * (`Hash`) A service account key as a Hash
|
|
1504
1502
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1505
1503
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1506
1504
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -1509,7 +1507,26 @@ module Google
|
|
|
1509
1507
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1510
1508
|
# * (`nil`) indicating no credentials
|
|
1511
1509
|
#
|
|
1512
|
-
# Warning:
|
|
1510
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
1511
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
1512
|
+
# Google APIs can compromise the security of your systems and data.
|
|
1513
|
+
#
|
|
1514
|
+
# @example
|
|
1515
|
+
#
|
|
1516
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
1517
|
+
# # on the appropriate credentials class for your environment.
|
|
1518
|
+
#
|
|
1519
|
+
# require "googleauth"
|
|
1520
|
+
#
|
|
1521
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
1522
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
1523
|
+
# )
|
|
1524
|
+
#
|
|
1525
|
+
# client = ::Google::Cloud::AIPlatform::V1::PipelineService::Client.new do |config|
|
|
1526
|
+
# config.credentials = credentials
|
|
1527
|
+
# end
|
|
1528
|
+
#
|
|
1529
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1513
1530
|
# external source for authentication to Google Cloud, you must validate it before
|
|
1514
1531
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1515
1532
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -650,8 +650,6 @@ module Google
|
|
|
650
650
|
# @return [::String,nil]
|
|
651
651
|
# @!attribute [rw] credentials
|
|
652
652
|
# Credentials to send with calls. You may provide any of the following types:
|
|
653
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
654
|
-
# * (`Hash`) A service account key as a Hash
|
|
655
653
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
656
654
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
657
655
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -660,7 +658,26 @@ module Google
|
|
|
660
658
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
661
659
|
# * (`nil`) indicating no credentials
|
|
662
660
|
#
|
|
663
|
-
# Warning:
|
|
661
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
662
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
663
|
+
# Google APIs can compromise the security of your systems and data.
|
|
664
|
+
#
|
|
665
|
+
# @example
|
|
666
|
+
#
|
|
667
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
668
|
+
# # on the appropriate credentials class for your environment.
|
|
669
|
+
#
|
|
670
|
+
# require "googleauth"
|
|
671
|
+
#
|
|
672
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
673
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
674
|
+
# )
|
|
675
|
+
#
|
|
676
|
+
# client = ::Google::Longrunning::Operations::Client.new do |config|
|
|
677
|
+
# config.credentials = credentials
|
|
678
|
+
# end
|
|
679
|
+
#
|
|
680
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
664
681
|
# external source for authentication to Google Cloud, you must validate it before
|
|
665
682
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
666
683
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -1523,6 +1523,105 @@ module Google
|
|
|
1523
1523
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1524
1524
|
end
|
|
1525
1525
|
|
|
1526
|
+
##
|
|
1527
|
+
# Embed content with multimodal inputs.
|
|
1528
|
+
#
|
|
1529
|
+
# @overload embed_content(request, options = nil)
|
|
1530
|
+
# Pass arguments to `embed_content` via a request object, either of type
|
|
1531
|
+
# {::Google::Cloud::AIPlatform::V1::EmbedContentRequest} or an equivalent Hash.
|
|
1532
|
+
#
|
|
1533
|
+
# @param request [::Google::Cloud::AIPlatform::V1::EmbedContentRequest, ::Hash]
|
|
1534
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1535
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1536
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1537
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1538
|
+
#
|
|
1539
|
+
# @overload embed_content(model: nil, content: nil, title: nil, task_type: nil, output_dimensionality: nil, auto_truncate: nil)
|
|
1540
|
+
# Pass arguments to `embed_content` via keyword arguments. Note that at
|
|
1541
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1542
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1543
|
+
#
|
|
1544
|
+
# @param model [::String]
|
|
1545
|
+
# Required. The name of the publisher model requested to serve the
|
|
1546
|
+
# prediction. Format:
|
|
1547
|
+
# `projects/{project}/locations/{location}/publishers/*/models/*`
|
|
1548
|
+
# @param content [::Google::Cloud::AIPlatform::V1::Content, ::Hash]
|
|
1549
|
+
# Required. Input content to be embedded. Required.
|
|
1550
|
+
# @param title [::String]
|
|
1551
|
+
# Optional. An optional title for the text.
|
|
1552
|
+
# @param task_type [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
|
|
1553
|
+
# Optional. The task type of the embedding.
|
|
1554
|
+
# @param output_dimensionality [::Integer]
|
|
1555
|
+
# Optional. Optional reduced dimension for the output embedding. If set,
|
|
1556
|
+
# excessive values in the output embedding are truncated from the end.
|
|
1557
|
+
# @param auto_truncate [::Boolean]
|
|
1558
|
+
# Optional. Whether to silently truncate the input content if it's longer
|
|
1559
|
+
# than the maximum sequence length.
|
|
1560
|
+
#
|
|
1561
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1562
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
1563
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1564
|
+
#
|
|
1565
|
+
# @return [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
1566
|
+
#
|
|
1567
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1568
|
+
#
|
|
1569
|
+
# @example Basic example
|
|
1570
|
+
# require "google/cloud/ai_platform/v1"
|
|
1571
|
+
#
|
|
1572
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1573
|
+
# client = Google::Cloud::AIPlatform::V1::PredictionService::Client.new
|
|
1574
|
+
#
|
|
1575
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1576
|
+
# request = Google::Cloud::AIPlatform::V1::EmbedContentRequest.new
|
|
1577
|
+
#
|
|
1578
|
+
# # Call the embed_content method.
|
|
1579
|
+
# result = client.embed_content request
|
|
1580
|
+
#
|
|
1581
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::EmbedContentResponse.
|
|
1582
|
+
# p result
|
|
1583
|
+
#
|
|
1584
|
+
def embed_content request, options = nil
|
|
1585
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1586
|
+
|
|
1587
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::EmbedContentRequest
|
|
1588
|
+
|
|
1589
|
+
# Converts hash and nil to an options object
|
|
1590
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1591
|
+
|
|
1592
|
+
# Customize the options with defaults
|
|
1593
|
+
metadata = @config.rpcs.embed_content.metadata.to_h
|
|
1594
|
+
|
|
1595
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1596
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1597
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1598
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1599
|
+
metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1600
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1601
|
+
|
|
1602
|
+
header_params = {}
|
|
1603
|
+
if request.model
|
|
1604
|
+
header_params["model"] = request.model
|
|
1605
|
+
end
|
|
1606
|
+
|
|
1607
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1608
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1609
|
+
|
|
1610
|
+
options.apply_defaults timeout: @config.rpcs.embed_content.timeout,
|
|
1611
|
+
metadata: metadata,
|
|
1612
|
+
retry_policy: @config.rpcs.embed_content.retry_policy
|
|
1613
|
+
|
|
1614
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1615
|
+
metadata: @config.metadata,
|
|
1616
|
+
retry_policy: @config.retry_policy
|
|
1617
|
+
|
|
1618
|
+
@prediction_service_stub.call_rpc :embed_content, request, options: options do |response, operation|
|
|
1619
|
+
yield response, operation if block_given?
|
|
1620
|
+
end
|
|
1621
|
+
rescue ::GRPC::BadStatus => e
|
|
1622
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1623
|
+
end
|
|
1624
|
+
|
|
1526
1625
|
##
|
|
1527
1626
|
# Configuration class for the PredictionService API.
|
|
1528
1627
|
#
|
|
@@ -1558,8 +1657,6 @@ module Google
|
|
|
1558
1657
|
# @return [::String,nil]
|
|
1559
1658
|
# @!attribute [rw] credentials
|
|
1560
1659
|
# Credentials to send with calls. You may provide any of the following types:
|
|
1561
|
-
# * (`String`) The path to a service account key file in JSON format
|
|
1562
|
-
# * (`Hash`) A service account key as a Hash
|
|
1563
1660
|
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1564
1661
|
# (see the [googleauth docs](https://rubydoc.info/gems/googleauth/Google/Auth/Credentials))
|
|
1565
1662
|
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
@@ -1568,7 +1665,26 @@ module Google
|
|
|
1568
1665
|
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1569
1666
|
# * (`nil`) indicating no credentials
|
|
1570
1667
|
#
|
|
1571
|
-
# Warning:
|
|
1668
|
+
# @note Warning: Passing a `String` to a keyfile path or a `Hash` of credentials
|
|
1669
|
+
# is deprecated. Providing an unvalidated credential configuration to
|
|
1670
|
+
# Google APIs can compromise the security of your systems and data.
|
|
1671
|
+
#
|
|
1672
|
+
# @example
|
|
1673
|
+
#
|
|
1674
|
+
# # The recommended way to provide credentials is to use the `make_creds` method
|
|
1675
|
+
# # on the appropriate credentials class for your environment.
|
|
1676
|
+
#
|
|
1677
|
+
# require "googleauth"
|
|
1678
|
+
#
|
|
1679
|
+
# credentials = ::Google::Auth::ServiceAccountCredentials.make_creds(
|
|
1680
|
+
# json_key_io: ::File.open("/path/to/keyfile.json")
|
|
1681
|
+
# )
|
|
1682
|
+
#
|
|
1683
|
+
# client = ::Google::Cloud::AIPlatform::V1::PredictionService::Client.new do |config|
|
|
1684
|
+
# config.credentials = credentials
|
|
1685
|
+
# end
|
|
1686
|
+
#
|
|
1687
|
+
# @note Warning: If you accept a credential configuration (JSON file or Hash) from an
|
|
1572
1688
|
# external source for authentication to Google Cloud, you must validate it before
|
|
1573
1689
|
# providing it to a Google API client library. Providing an unvalidated credential
|
|
1574
1690
|
# configuration to Google APIs can compromise the security of your systems and data.
|
|
@@ -1754,6 +1870,11 @@ module Google
|
|
|
1754
1870
|
# @return [::Gapic::Config::Method]
|
|
1755
1871
|
#
|
|
1756
1872
|
attr_reader :stream_generate_content
|
|
1873
|
+
##
|
|
1874
|
+
# RPC-specific configuration for `embed_content`
|
|
1875
|
+
# @return [::Gapic::Config::Method]
|
|
1876
|
+
#
|
|
1877
|
+
attr_reader :embed_content
|
|
1757
1878
|
|
|
1758
1879
|
# @private
|
|
1759
1880
|
def initialize parent_rpcs = nil
|
|
@@ -1783,6 +1904,8 @@ module Google
|
|
|
1783
1904
|
@generate_content = ::Gapic::Config::Method.new generate_content_config
|
|
1784
1905
|
stream_generate_content_config = parent_rpcs.stream_generate_content if parent_rpcs.respond_to? :stream_generate_content
|
|
1785
1906
|
@stream_generate_content = ::Gapic::Config::Method.new stream_generate_content_config
|
|
1907
|
+
embed_content_config = parent_rpcs.embed_content if parent_rpcs.respond_to? :embed_content
|
|
1908
|
+
@embed_content = ::Gapic::Config::Method.new embed_content_config
|
|
1786
1909
|
|
|
1787
1910
|
yield self if block_given?
|
|
1788
1911
|
end
|
|
@@ -1146,6 +1146,98 @@ module Google
|
|
|
1146
1146
|
raise ::Google::Cloud::Error.from_error(e)
|
|
1147
1147
|
end
|
|
1148
1148
|
|
|
1149
|
+
##
|
|
1150
|
+
# Embed content with multimodal inputs.
|
|
1151
|
+
#
|
|
1152
|
+
# @overload embed_content(request, options = nil)
|
|
1153
|
+
# Pass arguments to `embed_content` via a request object, either of type
|
|
1154
|
+
# {::Google::Cloud::AIPlatform::V1::EmbedContentRequest} or an equivalent Hash.
|
|
1155
|
+
#
|
|
1156
|
+
# @param request [::Google::Cloud::AIPlatform::V1::EmbedContentRequest, ::Hash]
|
|
1157
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1158
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1159
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1160
|
+
# Overrides the default settings for this call, e.g, timeout, retries etc. Optional.
|
|
1161
|
+
#
|
|
1162
|
+
# @overload embed_content(model: nil, content: nil, title: nil, task_type: nil, output_dimensionality: nil, auto_truncate: nil)
|
|
1163
|
+
# Pass arguments to `embed_content` via keyword arguments. Note that at
|
|
1164
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1165
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1166
|
+
#
|
|
1167
|
+
# @param model [::String]
|
|
1168
|
+
# Required. The name of the publisher model requested to serve the
|
|
1169
|
+
# prediction. Format:
|
|
1170
|
+
# `projects/{project}/locations/{location}/publishers/*/models/*`
|
|
1171
|
+
# @param content [::Google::Cloud::AIPlatform::V1::Content, ::Hash]
|
|
1172
|
+
# Required. Input content to be embedded. Required.
|
|
1173
|
+
# @param title [::String]
|
|
1174
|
+
# Optional. An optional title for the text.
|
|
1175
|
+
# @param task_type [::Google::Cloud::AIPlatform::V1::EmbedContentRequest::EmbeddingTaskType]
|
|
1176
|
+
# Optional. The task type of the embedding.
|
|
1177
|
+
# @param output_dimensionality [::Integer]
|
|
1178
|
+
# Optional. Optional reduced dimension for the output embedding. If set,
|
|
1179
|
+
# excessive values in the output embedding are truncated from the end.
|
|
1180
|
+
# @param auto_truncate [::Boolean]
|
|
1181
|
+
# Optional. Whether to silently truncate the input content if it's longer
|
|
1182
|
+
# than the maximum sequence length.
|
|
1183
|
+
# @yield [result, operation] Access the result along with the TransportOperation object
|
|
1184
|
+
# @yieldparam result [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
1185
|
+
# @yieldparam operation [::Gapic::Rest::TransportOperation]
|
|
1186
|
+
#
|
|
1187
|
+
# @return [::Google::Cloud::AIPlatform::V1::EmbedContentResponse]
|
|
1188
|
+
#
|
|
1189
|
+
# @raise [::Google::Cloud::Error] if the REST call is aborted.
|
|
1190
|
+
#
|
|
1191
|
+
# @example Basic example
|
|
1192
|
+
# require "google/cloud/ai_platform/v1"
|
|
1193
|
+
#
|
|
1194
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1195
|
+
# client = Google::Cloud::AIPlatform::V1::PredictionService::Rest::Client.new
|
|
1196
|
+
#
|
|
1197
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1198
|
+
# request = Google::Cloud::AIPlatform::V1::EmbedContentRequest.new
|
|
1199
|
+
#
|
|
1200
|
+
# # Call the embed_content method.
|
|
1201
|
+
# result = client.embed_content request
|
|
1202
|
+
#
|
|
1203
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::EmbedContentResponse.
|
|
1204
|
+
# p result
|
|
1205
|
+
#
|
|
1206
|
+
def embed_content request, options = nil
|
|
1207
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1208
|
+
|
|
1209
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::EmbedContentRequest
|
|
1210
|
+
|
|
1211
|
+
# Converts hash and nil to an options object
|
|
1212
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1213
|
+
|
|
1214
|
+
# Customize the options with defaults
|
|
1215
|
+
call_metadata = @config.rpcs.embed_content.metadata.to_h
|
|
1216
|
+
|
|
1217
|
+
# Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers
|
|
1218
|
+
call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1219
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1220
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION,
|
|
1221
|
+
transports_version_send: [:rest]
|
|
1222
|
+
|
|
1223
|
+
call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty?
|
|
1224
|
+
call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1225
|
+
|
|
1226
|
+
options.apply_defaults timeout: @config.rpcs.embed_content.timeout,
|
|
1227
|
+
metadata: call_metadata,
|
|
1228
|
+
retry_policy: @config.rpcs.embed_content.retry_policy
|
|
1229
|
+
|
|
1230
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1231
|
+
metadata: @config.metadata,
|
|
1232
|
+
retry_policy: @config.retry_policy
|
|
1233
|
+
|
|
1234
|
+
@prediction_service_stub.embed_content request, options do |result, operation|
|
|
1235
|
+
yield result, operation if block_given?
|
|
1236
|
+
end
|
|
1237
|
+
rescue ::Gapic::Rest::Error => e
|
|
1238
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1239
|
+
end
|
|
1240
|
+
|
|
1149
1241
|
##
|
|
1150
1242
|
# Configuration class for the PredictionService REST API.
|
|
1151
1243
|
#
|
|
@@ -1344,6 +1436,11 @@ module Google
|
|
|
1344
1436
|
# @return [::Gapic::Config::Method]
|
|
1345
1437
|
#
|
|
1346
1438
|
attr_reader :stream_generate_content
|
|
1439
|
+
##
|
|
1440
|
+
# RPC-specific configuration for `embed_content`
|
|
1441
|
+
# @return [::Gapic::Config::Method]
|
|
1442
|
+
#
|
|
1443
|
+
attr_reader :embed_content
|
|
1347
1444
|
|
|
1348
1445
|
# @private
|
|
1349
1446
|
def initialize parent_rpcs = nil
|
|
@@ -1365,6 +1462,8 @@ module Google
|
|
|
1365
1462
|
@generate_content = ::Gapic::Config::Method.new generate_content_config
|
|
1366
1463
|
stream_generate_content_config = parent_rpcs.stream_generate_content if parent_rpcs.respond_to? :stream_generate_content
|
|
1367
1464
|
@stream_generate_content = ::Gapic::Config::Method.new stream_generate_content_config
|
|
1465
|
+
embed_content_config = parent_rpcs.embed_content if parent_rpcs.respond_to? :embed_content
|
|
1466
|
+
@embed_content = ::Gapic::Config::Method.new embed_content_config
|
|
1368
1467
|
|
|
1369
1468
|
yield self if block_given?
|
|
1370
1469
|
end
|