Class: Aws::BedrockRuntime::Types::ContentBlock

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

Overview

Note:

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

Note:

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

A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.

Defined Under Namespace

Classes: Audio, CachePoint, CitationsContent, Document, GuardContent, Image, ReasoningContent, SearchResult, Text, ToolResult, ToolUse, Unknown, Video

Constant Summary collapse

SENSITIVE =
[:reasoning_content]

Instance Attribute Summary collapse

Instance Attribute Details

#audioTypes::AudioBlock

An audio content block containing audio data in the conversation.

Returns:



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#cache_pointTypes::CachePointBlock

CachePoint to include in the message.



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#citations_contentTypes::CitationsContentBlock

A content block that contains both generated text and associated citation information, providing traceability between the response and source documents.



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#documentTypes::DocumentBlock

A document to include in the message.



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#guard_contentTypes::GuardrailConverseContentBlock

Contains the content to assess with the guardrail. If you don't specify guardContent in a call to the Converse API, the guardrail (if passed in the Converse API) assesses the entire message.

For more information, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#imageTypes::ImageBlock

Image to include in the message.

This field is only supported by Anthropic Claude 3 models.

Returns:



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#reasoning_contentTypes::ReasoningContentBlock

Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#search_resultTypes::SearchResultBlock

Search result to include in the message.



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#textString

Text to include in the message.

Returns:

  • (String)


715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#tool_resultTypes::ToolResultBlock

The result for a tool request that a model makes.



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#tool_useTypes::ToolUseBlock

Information about a tool use request from a model.

Returns:



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end

#unknownObject

Returns the value of attribute unknown

Returns:

  • (Object)

    the current value of unknown



715
716
717
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

def unknown
  @unknown
end

#videoTypes::VideoBlock

Video to include in the message.

Returns:



715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# File 'gems/aws-sdk-bedrockruntime/lib/aws-sdk-bedrockruntime/types.rb', line 715

class ContentBlock < Struct.new(
  :text,
  :image,
  :document,
  :video,
  :audio,
  :tool_use,
  :tool_result,
  :guard_content,
  :cache_point,
  :reasoning_content,
  :citations_content,
  :search_result,
  :unknown)
  SENSITIVE = [:reasoning_content]
  include Aws::Structure
  include Aws::Structure::Union

  class Text < ContentBlock; end
  class Image < ContentBlock; end
  class Document < ContentBlock; end
  class Video < ContentBlock; end
  class Audio < ContentBlock; end
  class ToolUse < ContentBlock; end
  class ToolResult < ContentBlock; end
  class GuardContent < ContentBlock; end
  class CachePoint < ContentBlock; end
  class ReasoningContent < ContentBlock; end
  class CitationsContent < ContentBlock; end
  class SearchResult < ContentBlock; end
  class Unknown < ContentBlock; end
end