Class: Aws::BedrockRuntime::Types::CountTokensInput

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

Overview

Note:

CountTokensInput is a union - when making an API calls you must set exactly one of the members.

The input value for token counting. The value should be either an InvokeModel or Converse request body.

Direct Known Subclasses

Converse, InvokeModel, Unknown

Defined Under Namespace

Classes: Converse, InvokeModel, Unknown

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#converseTypes::ConverseTokensRequest

A Converse request for which to count tokens. Use this field when you want to count tokens for a conversation-based input that would be sent to the Converse operation.



1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 1240

class CountTokensInput < Struct.new(
  :invoke_model,
  :converse,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class InvokeModel < CountTokensInput; end
  class Converse < CountTokensInput; end
  class Unknown < CountTokensInput; end
end

#invoke_modelTypes::InvokeModelTokensRequest

An InvokeModel request for which to count tokens. Use this field when you want to count tokens for a raw text input that would be sent to the InvokeModel operation.



1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 1240

class CountTokensInput < Struct.new(
  :invoke_model,
  :converse,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class InvokeModel < CountTokensInput; end
  class Converse < CountTokensInput; end
  class Unknown < CountTokensInput; end
end

#unknownObject

Returns the value of attribute unknown

Returns:

  • (Object)

    the current value of unknown



1240
1241
1242
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 1240

def unknown
  @unknown
end