Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1CountTokensRequest

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 PredictionService.CountTokens.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1CountTokensRequest

Returns a new instance of GoogleCloudAiplatformV1beta1CountTokensRequest.



4144
4145
4146
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4144

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

Instance Attribute Details

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

Optional. Input content. Corresponds to the JSON property contents



4109
4110
4111
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4109

def contents
  @contents
end

#generation_configGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerationConfig

Generation config. Corresponds to the JSON property generationConfig



4114
4115
4116
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4114

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


4120
4121
4122
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4120

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)


4126
4127
4128
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4126

def model
  @model
end

#system_instructionGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content

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



4134
4135
4136
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4134

def system_instruction
  @system_instruction
end

#toolsArray<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Tool>

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



4142
4143
4144
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4142

def tools
  @tools
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



4149
4150
4151
4152
4153
4154
4155
4156
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 4149

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