Class: Aws::BedrockRuntime::Types::TokenUsage

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb

Overview

The tokens used in a message API inference call.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#cache_detailsArray<Types::CacheDetail>

Detailed breakdown of cache writes by TTL. Empty if no cache creation occurred. Sorted by TTL duration (1h before 5m).

Returns:



4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4440

class TokenUsage < Struct.new(
  :input_tokens,
  :output_tokens,
  :total_tokens,
  :cache_read_input_tokens,
  :cache_write_input_tokens,
  :cache_details)
  SENSITIVE = []
  include Aws::Structure
end

#cache_read_input_tokensInteger

The number of input tokens read from the cache for the request.

Returns:

  • (Integer)


4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4440

class TokenUsage < Struct.new(
  :input_tokens,
  :output_tokens,
  :total_tokens,
  :cache_read_input_tokens,
  :cache_write_input_tokens,
  :cache_details)
  SENSITIVE = []
  include Aws::Structure
end

#cache_write_input_tokensInteger

The number of input tokens written to the cache for the request.

Returns:

  • (Integer)


4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4440

class TokenUsage < Struct.new(
  :input_tokens,
  :output_tokens,
  :total_tokens,
  :cache_read_input_tokens,
  :cache_write_input_tokens,
  :cache_details)
  SENSITIVE = []
  include Aws::Structure
end

#input_tokensInteger

The number of tokens sent in the request to the model.

Returns:

  • (Integer)


4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4440

class TokenUsage < Struct.new(
  :input_tokens,
  :output_tokens,
  :total_tokens,
  :cache_read_input_tokens,
  :cache_write_input_tokens,
  :cache_details)
  SENSITIVE = []
  include Aws::Structure
end

#output_tokensInteger

The number of tokens that the model generated for the request.

Returns:

  • (Integer)


4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4440

class TokenUsage < Struct.new(
  :input_tokens,
  :output_tokens,
  :total_tokens,
  :cache_read_input_tokens,
  :cache_write_input_tokens,
  :cache_details)
  SENSITIVE = []
  include Aws::Structure
end

#total_tokensInteger

The total of input tokens and tokens generated by the model.

Returns:

  • (Integer)


4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4440

class TokenUsage < Struct.new(
  :input_tokens,
  :output_tokens,
  :total_tokens,
  :cache_read_input_tokens,
  :cache_write_input_tokens,
  :cache_details)
  SENSITIVE = []
  include Aws::Structure
end