Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CountTokensRequest
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1::GoogleCloudAiplatformV1CountTokensRequest
- 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
-
#contents ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>
Optional.
-
#generation_config ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig
Generation config.
-
#instances ⇒ Array<Object>
Optional.
-
#model ⇒ String
Optional.
-
#system_instruction ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content
The base structured datatype containing multi-part content of a message.
-
#tools ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Tool>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1CountTokensRequest
constructor
A new instance of GoogleCloudAiplatformV1CountTokensRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1CountTokensRequest
Returns a new instance of GoogleCloudAiplatformV1CountTokensRequest.
3296 3297 3298 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3296 def initialize(**args) update!(**args) end |
Instance Attribute Details
#contents ⇒ Array<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1Content>
Optional. Input content.
Corresponds to the JSON property contents
3261 3262 3263 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3261 def contents @contents end |
#generation_config ⇒ Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerationConfig
Generation config.
Corresponds to the JSON property generationConfig
3266 3267 3268 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3266 def generation_config @generation_config end |
#instances ⇒ Array<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
3272 3273 3274 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3272 def instances @instances end |
#model ⇒ String
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
3278 3279 3280 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3278 def model @model end |
#system_instruction ⇒ Google::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
3286 3287 3288 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3286 def system_instruction @system_instruction end |
#tools ⇒ Array<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
3294 3295 3296 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3294 def tools @tools end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
3301 3302 3303 3304 3305 3306 3307 3308 |
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 3301 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 |