Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1ComputeTokensRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/aiplatform_v1beta1/classes.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb,
lib/google/apis/aiplatform_v1beta1/representations.rb

Overview

Request message for ComputeTokens RPC call.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1ComputeTokensRequest

Returns a new instance of GoogleCloudAiplatformV1beta1ComputeTokensRequest.



3210
3211
3212
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3210

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#contentsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content>

Optional. Input content. Corresponds to the JSON property contents



3195
3196
3197
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3195

def contents
  @contents
end

#instancesArray<Object>

Optional. The instances that are the input to token computing API call. Schema is identical to the prediction schema of the text model, even for the non-text models, like chat models, or Codey models. Corresponds to the JSON property instances

Returns:

  • (Array<Object>)


3202
3203
3204
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3202

def instances
  @instances
end

#modelString

Optional. The name of the publisher model requested to serve the prediction. Format: projects/project/locations/location/publishers//models/ Corresponds to the JSON property model

Returns:

  • (String)


3208
3209
3210
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3208

def model
  @model
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3215
3216
3217
3218
3219
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3215

def update!(**args)
  @contents = args[:contents] if args.key?(:contents)
  @instances = args[:instances] if args.key?(:instances)
  @model = args[:model] if args.key?(:model)
end