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.



10985
10986
10987
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10985

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

Instance Attribute Details

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

Optional. Input content. Corresponds to the JSON property contents



10949
10950
10951
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10949

def contents
  @contents
end

#generation_configGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerationConfig

Configuration for content generation. This message contains all the parameters that control how the model generates content. It allows you to influence the randomness, length, and structure of the output. Corresponds to the JSON property generationConfig



10956
10957
10958
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10956

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


10962
10963
10964
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10962

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)


10968
10969
10970
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10968

def model
  @model
end

#system_instructionGoogle::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content

The structured data content of a message. A Content message contains a role field, which indicates the producer of the content, and a parts field, which contains the multi-part data of the message. Corresponds to the JSON property systemInstruction



10975
10976
10977
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10975

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



10983
10984
10985
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10983

def tools
  @tools
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



10990
10991
10992
10993
10994
10995
10996
10997
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 10990

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