Class: Aws::BedrockRuntime::Types::ToolChoice

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

Overview

Note:

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

Determines which tools the model should request in a call to Converse or ConverseStream. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Direct Known Subclasses

Any, Auto, Tool, Unknown

Defined Under Namespace

Classes: Any, Auto, Tool, Unknown

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#anyTypes::AnyToolChoice

The model must request at least one tool (no text is generated).

Returns:

  • (Types::AnyToolChoice)


4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4384

class ToolChoice < Struct.new(
  :auto,
  :any,
  :tool,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Auto < ToolChoice; end
  class Any < ToolChoice; end
  class Tool < ToolChoice; end
  class Unknown < ToolChoice; end
end

#autoTypes::AutoToolChoice

(Default). The Model automatically decides if a tool should be called or whether to generate text instead.

Returns:

  • (Types::AutoToolChoice)


4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4384

class ToolChoice < Struct.new(
  :auto,
  :any,
  :tool,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Auto < ToolChoice; end
  class Any < ToolChoice; end
  class Tool < ToolChoice; end
  class Unknown < ToolChoice; end
end

#toolTypes::SpecificToolChoice

The Model must request the specified tool. Only supported by Anthropic Claude 3 and Amazon Nova models.



4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4384

class ToolChoice < Struct.new(
  :auto,
  :any,
  :tool,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Auto < ToolChoice; end
  class Any < ToolChoice; end
  class Tool < ToolChoice; end
  class Unknown < ToolChoice; end
end

#unknownObject

Returns the value of attribute unknown

Returns:

  • (Object)

    the current value of unknown



4384
4385
4386
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 4384

def unknown
  @unknown
end