Class: Google::Apis::AiplatformV1::GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata

Inherits:
Object
  • Object
show all
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

Usage metadata about response(s).

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata

Returns a new instance of GoogleCloudAiplatformV1GenerateContentResponseUsageMetadata.



11821
11822
11823
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11821

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

Instance Attribute Details

#cache_tokens_detailsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>

Output only. List of modalities of the cached content in the request input. Corresponds to the JSON property cacheTokensDetails



11786
11787
11788
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11786

def cache_tokens_details
  @cache_tokens_details
end

#cached_content_token_countFixnum

Output only. Number of tokens in the cached part in the input (the cached content). Corresponds to the JSON property cachedContentTokenCount

Returns:

  • (Fixnum)


11792
11793
11794
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11792

def cached_content_token_count
  @cached_content_token_count
end

#candidates_token_countFixnum

Number of tokens in the response(s). Corresponds to the JSON property candidatesTokenCount

Returns:

  • (Fixnum)


11797
11798
11799
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11797

def candidates_token_count
  @candidates_token_count
end

#candidates_tokens_detailsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>

Output only. List of modalities that were returned in the response. Corresponds to the JSON property candidatesTokensDetails



11802
11803
11804
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11802

def candidates_tokens_details
  @candidates_tokens_details
end

#prompt_token_countFixnum

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

Returns:

  • (Fixnum)


11809
11810
11811
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11809

def prompt_token_count
  @prompt_token_count
end

#prompt_tokens_detailsArray<Google::Apis::AiplatformV1::GoogleCloudAiplatformV1ModalityTokenCount>

Output only. List of modalities that were processed in the request input. Corresponds to the JSON property promptTokensDetails



11814
11815
11816
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11814

def prompt_tokens_details
  @prompt_tokens_details
end

#total_token_countFixnum

Total token count for prompt and response candidates. Corresponds to the JSON property totalTokenCount

Returns:

  • (Fixnum)


11819
11820
11821
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11819

def total_token_count
  @total_token_count
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



11826
11827
11828
11829
11830
11831
11832
11833
11834
# File 'lib/google/apis/aiplatform_v1/classes.rb', line 11826

def update!(**args)
  @cache_tokens_details = args[:cache_tokens_details] if args.key?(:cache_tokens_details)
  @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)
  @candidates_tokens_details = args[:candidates_tokens_details] if args.key?(:candidates_tokens_details)
  @prompt_token_count = args[:prompt_token_count] if args.key?(:prompt_token_count)
  @prompt_tokens_details = args[:prompt_tokens_details] if args.key?(:prompt_tokens_details)
  @total_token_count = args[:total_token_count] if args.key?(:total_token_count)
end