Class: Google::Apis::FirebasemlV2beta::CountTokensRequest

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

Overview

Request message for PredictionService.CountTokens.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CountTokensRequest

Returns a new instance of CountTokensRequest.



239
240
241
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 239

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

Instance Attribute Details

#contentsArray<Google::Apis::FirebasemlV2beta::Content>

Required. Input content. Corresponds to the JSON property contents



225
226
227
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 225

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


231
232
233
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 231

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)


237
238
239
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 237

def model
  @model
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



244
245
246
247
248
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 244

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