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.



3554
3555
3556
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3554

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

Instance Attribute Details

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

Optional. Input content. Corresponds to the JSON property contents



3524
3525
3526
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3524

def contents
  @contents
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>)


3530
3531
3532
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3530

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)


3536
3537
3538
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3536

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



3544
3545
3546
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3544

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



3552
3553
3554
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3552

def tools
  @tools
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



3559
3560
3561
3562
3563
3564
3565
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 3559

def update!(**args)
  @contents = args[:contents] if args.key?(:contents)
  @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