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.



4248
4249
4250
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4248

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

Instance Attribute Details

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

Optional. Input content. Corresponds to the JSON property contents



4213
4214
4215
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4213

def contents
  @contents
end

#generation_configGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig

Generation config. Corresponds to the JSON property generationConfig



4218
4219
4220
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4218

def generation_config
  @generation_config
end

#instancesArray<Object>

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


4224
4225
4226
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4224

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)


4230
4231
4232
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4230

def model
  @model
end

#system_instructionGoogle::Apis::AiplatformV1::GoogleCloudAiplatformV1Content

The base structured datatype containing multi-part content of a message. A Content includes a role field designating the producer of the Content and a parts field containing multi-part data that contains the content of the message turn. Corresponds to the JSON property systemInstruction



4238
4239
4240
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4238

def system_instruction
  @system_instruction
end

#toolsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Tool>

Optional. A list of Tools the model may use to generate the next response. A Tool is a piece of code that enables the system to interact with external systems to perform an action, or set of actions, outside of knowledge and scope of the model. Corresponds to the JSON property tools



4246
4247
4248
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4246

def tools
  @tools
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4253
4254
4255
4256
4257
4258
4259
4260
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 4253

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