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

Inherits:
Struct
  • Object
show all
Includes:
Structure, Structure::Union
Defined in:
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`. `ToolChoice` is only supported by Anthropic Claude 3 models and by Mistral AI Mistral Large.

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).



2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2053

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.



2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2053

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 models.



2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2053

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



2053
2054
2055
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2053

def unknown
  @unknown
end