Class: Google::Apis::FirebasemlV2beta::UsageMetadata
- Inherits:
-
Object
- Object
- Google::Apis::FirebasemlV2beta::UsageMetadata
- 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
-
#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
Corresponds to the JSON property
totalTokenCount.
Instance Method Summary collapse
-
#initialize(**args) ⇒ UsageMetadata
constructor
A new instance of UsageMetadata.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ UsageMetadata
Returns a new instance of UsageMetadata.
1207 1208 1209 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1207 def initialize(**args) update!(**args) end |
Instance Attribute Details
#candidates_token_count ⇒ Fixnum
Number of tokens in the response(s).
Corresponds to the JSON property candidatesTokenCount
1195 1196 1197 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1195 def candidates_token_count @candidates_token_count end |
#prompt_token_count ⇒ Fixnum
Number of tokens in the request.
Corresponds to the JSON property promptTokenCount
1200 1201 1202 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1200 def prompt_token_count @prompt_token_count end |
#total_token_count ⇒ Fixnum
Corresponds to the JSON property totalTokenCount
1205 1206 1207 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1205 def total_token_count @total_token_count end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
1212 1213 1214 1215 1216 |
# File 'lib/google/apis/firebaseml_v2beta/classes.rb', line 1212 def update!(**args) @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 |