Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CountTokensRequest

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

Overview

Request message for PredictionService.CountTokens.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1CountTokensRequest

Returns a new instance of GoogleCloudAiplatformV1CountTokensRequest.



3721
3722
3723
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3721

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

Instance Attribute Details

#contentsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>

Required. Input content. Corresponds to the JSON property contents



3707
3708
3709
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3707

def contents
  @contents
end

#instancesArray<Object>

Required. The instances that are the input to token counting call. Schema is identical to the prediction schema of the underlying model. Corresponds to the JSON property instances

Returns:

  • (Array<Object>)


3713
3714
3715
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3713

def instances
  @instances
end

#modelString

Required. 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)


3719
3720
3721
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3719

def model
  @model
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3726
3727
3728
3729
3730
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3726

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