Class: Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1CountTokensRequest
- Inherits:
-
Object
- Object
- Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1CountTokensRequest
- 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
-
#contents ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content>
Optional.
-
#generation_config ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1GenerationConfig
Configuration for content generation.
-
#instances ⇒ Array<Object>
Optional.
-
#model ⇒ String
Optional.
-
#system_instruction ⇒ Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content
The structured data content of a message.
-
#tools ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Tool>
Optional.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1CountTokensRequest
constructor
A new instance of GoogleCloudAiplatformV1beta1CountTokensRequest.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1CountTokensRequest
Returns a new instance of GoogleCloudAiplatformV1beta1CountTokensRequest.
5696 5697 5698 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 5696 def initialize(**args) update!(**args) end |
Instance Attribute Details
#contents ⇒ Array<Google::Apis::AiplatformV1beta1::GoogleCloudAiplatformV1beta1Content>
Optional. Input content.
Corresponds to the JSON property contents
5660 5661 5662 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 5660 def contents @contents end |
#generation_config ⇒ Google::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
5667 5668 5669 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 5667 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
5673 5674 5675 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 5673 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
5679 5680 5681 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 5679 def model @model end |
#system_instruction ⇒ Google::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
5686 5687 5688 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 5686 def system_instruction @system_instruction end |
#tools ⇒ Array<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
5694 5695 5696 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 5694 def tools @tools end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
5701 5702 5703 5704 5705 5706 5707 5708 |
# File 'lib/google/apis/aiplatform_v1beta1/classes.rb', line 5701 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 |