Class: Google::Apis::PubsubV1::AiInference
- Inherits:
-
Object
- Object
- Google::Apis::PubsubV1::AiInference
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/pubsub_v1/classes.rb,
lib/google/apis/pubsub_v1/representations.rb,
lib/google/apis/pubsub_v1/representations.rb
Overview
Configuration for making inference requests against Vertex AI models.
Instance Attribute Summary collapse
-
#endpoint ⇒ String
Required.
-
#service_account_email ⇒ String
Optional.
-
#unstructured_inference ⇒ Google::Apis::PubsubV1::UnstructuredInference
Configuration for making inferences using arbitrary JSON payloads.
Instance Method Summary collapse
-
#initialize(**args) ⇒ AiInference
constructor
A new instance of AiInference.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ AiInference
Returns a new instance of AiInference.
52 53 54 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 52 def initialize(**args) update!(**args) end |
Instance Attribute Details
#endpoint ⇒ String
Required. An endpoint to a Vertex AI model of the form projects/project/
locations/location/endpoints/endpointor `projects/`project`/locations/`
location`/publishers/`publisher`/models/`model. Vertex AI API requests will
be sent to this endpoint.
Corresponds to the JSON property endpoint
35 36 37 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 35 def endpoint @endpoint end |
#service_account_email ⇒ String
Optional. The service account to use to make prediction requests against
endpoints. The resource creator or updater that specifies this field must have
iam.serviceAccounts.actAs permission on the service account. If not
specified, the Pub/Sub service agent, service-project_number@
gcp-sa-pubsub.iam.gserviceaccount.com, is used.
Corresponds to the JSON property serviceAccountEmail
45 46 47 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 45 def service_account_email @service_account_email end |
#unstructured_inference ⇒ Google::Apis::PubsubV1::UnstructuredInference
Configuration for making inferences using arbitrary JSON payloads.
Corresponds to the JSON property unstructuredInference
50 51 52 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 50 def unstructured_inference @unstructured_inference end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
57 58 59 60 61 |
# File 'lib/google/apis/pubsub_v1/classes.rb', line 57 def update!(**args) @endpoint = args[:endpoint] if args.key?(:endpoint) @service_account_email = args[:service_account_email] if args.key?(:service_account_email) @unstructured_inference = args[:unstructured_inference] if args.key?(:unstructured_inference) end |