Class: Google::Apis::PubsubV1::AiInference

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#endpointString

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

Returns:

  • (String)


35
36
37
# File 'lib/google/apis/pubsub_v1/classes.rb', line 35

def endpoint
  @endpoint
end

#service_account_emailString

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

Returns:

  • (String)


45
46
47
# File 'lib/google/apis/pubsub_v1/classes.rb', line 45

def 
  @service_account_email
end

#unstructured_inferenceGoogle::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