Class: Aws::BedrockRuntime::Types::ToolResultContentBlock

Inherits:
Struct
  • Object
show all
Includes:
Structure, Structure::Union
Defined in:
lib/aws-sdk-bedrockruntime/types.rb

Overview

Note:

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

Note:

ToolResultContentBlock is a union - when returned from an API call exactly one value will be set and the returned type will be a subclass of ToolResultContentBlock corresponding to the set member.

The tool result content block.

Direct Known Subclasses

Document, Image, Json, Text, Unknown

Defined Under Namespace

Classes: Document, Image, Json, Text, Unknown

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#documentTypes::DocumentBlock

A tool result that is a document.



2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2248

class ToolResultContentBlock < Struct.new(
  :json,
  :text,
  :image,
  :document,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Json < ToolResultContentBlock; end
  class Text < ToolResultContentBlock; end
  class Image < ToolResultContentBlock; end
  class Document < ToolResultContentBlock; end
  class Unknown < ToolResultContentBlock; end
end

#imageTypes::ImageBlock

A tool result that is an image.

<note markdown=“1”> This field is only supported by Anthropic Claude 3 models.

</note>

Returns:



2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2248

class ToolResultContentBlock < Struct.new(
  :json,
  :text,
  :image,
  :document,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Json < ToolResultContentBlock; end
  class Text < ToolResultContentBlock; end
  class Image < ToolResultContentBlock; end
  class Document < ToolResultContentBlock; end
  class Unknown < ToolResultContentBlock; end
end

#jsonHash, ...

A tool result that is JSON format data.

Returns:

  • (Hash, Array, String, Numeric, Boolean)


2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2248

class ToolResultContentBlock < Struct.new(
  :json,
  :text,
  :image,
  :document,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Json < ToolResultContentBlock; end
  class Text < ToolResultContentBlock; end
  class Image < ToolResultContentBlock; end
  class Document < ToolResultContentBlock; end
  class Unknown < ToolResultContentBlock; end
end

#textString

A tool result that is text.

Returns:

  • (String)


2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2248

class ToolResultContentBlock < Struct.new(
  :json,
  :text,
  :image,
  :document,
  :unknown)
  SENSITIVE = []
  include Aws::Structure
  include Aws::Structure::Union

  class Json < ToolResultContentBlock; end
  class Text < ToolResultContentBlock; end
  class Image < ToolResultContentBlock; end
  class Document < ToolResultContentBlock; end
  class Unknown < ToolResultContentBlock; end
end

#unknownObject

Returns the value of attribute unknown

Returns:

  • (Object)

    the current value of unknown



2248
2249
2250
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 2248

def unknown
  @unknown
end