Class: Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata
- Inherits:
-
Object
- Object
- Google::Apis::FirebasemlV2beta::GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/firebaseml_v2beta/classes.rb,
lib/google/apis/firebaseml_v2beta/representations.rb,
lib/google/apis/firebaseml_v2beta/representations.rb
Overview
Usage metadata about response(s).
Instance Attribute Summary collapse
-
#cached_content_token_count ⇒ Fixnum
Output only.
-
#candidates_token_count ⇒ Fixnum
Number of tokens in the response(s).
-
#prompt_token_count ⇒ Fixnum
Number of tokens in the request.
-
#total_token_count ⇒ Fixnum
Total token count for prompt and response candidates.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata
constructor
A new instance of GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata
Returns a new instance of GoogleCloudAiplatformV1beta1GenerateContentResponseUsageMetadata.
767 768 769 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 767 def initialize(**args) update!(**args) end |
Instance Attribute Details
#cached_content_token_count ⇒ Fixnum
Output only. Number of tokens in the cached part in the input (the cached
content).
Corresponds to the JSON property cachedContentTokenCount
748 749 750 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 748 def cached_content_token_count @cached_content_token_count end |
#candidates_token_count ⇒ Fixnum
Number of tokens in the response(s).
Corresponds to the JSON property candidatesTokenCount
753 754 755 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 753 def candidates_token_count @candidates_token_count end |
#prompt_token_count ⇒ Fixnum
Number of tokens in the request. When cached_content is set, this is still
the total effective prompt size meaning this includes the number of tokens in
the cached content.
Corresponds to the JSON property promptTokenCount
760 761 762 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 760 def prompt_token_count @prompt_token_count end |
#total_token_count ⇒ Fixnum
Total token count for prompt and response candidates.
Corresponds to the JSON property totalTokenCount
765 766 767 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 765 def total_token_count @total_token_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
772 773 774 775 776 777 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 772 def update!(**args) @cached_content_token_count = args[:cached_content_token_count] if args.key?(:cached_content_token_count) @candidates_token_count = args[:candidates_token_count] if args.key?(:candidates_token_count) @prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count) @total_token_count = args[:total_token_count] if args.key?(:total_token_count) end |