Class: Aws::BedrockRuntime::Types::ContentBlock
- Inherits:
-
Struct
- Object
- Struct
- Aws::BedrockRuntime::Types::ContentBlock
- Includes:
- Structure, Structure::Union
- Defined in:
- lib/aws-sdk-bedrockruntime/types.rb
Overview
ContentBlock is a union - when making an API calls you must set exactly one of the members.
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.
[1]: docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_Converse.html [2]: docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseStream.html
Direct Known Subclasses
Document, GuardContent, Image, Text, ToolResult, ToolUse, Unknown, Video
Defined Under Namespace
Classes: Document, GuardContent, Image, Text, ToolResult, ToolUse, Unknown, Video
Constant Summary collapse
- SENSITIVE =
[]
Instance Attribute Summary collapse
-
#document ⇒ Types::DocumentBlock
A document to include in the message.
-
#guard_content ⇒ Types::GuardrailConverseContentBlock
Contains the content to assess with the guardrail.
-
#image ⇒ Types::ImageBlock
Image to include in the message.
-
#text ⇒ String
Text to include in the message.
-
#tool_result ⇒ Types::ToolResultBlock
The result for a tool request that a model makes.
-
#tool_use ⇒ Types::ToolUseBlock
Information about a tool use request from a model.
-
#unknown ⇒ Object
Returns the value of attribute unknown.
-
#video ⇒ Types::VideoBlock
Video to include in the message.
Instance Attribute Details
#document ⇒ Types::DocumentBlock
A document to include in the message.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275 class ContentBlock < Struct.new( :text, :image, :document, :video, :tool_use, :tool_result, :guard_content, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class Text < ContentBlock; end class Image < ContentBlock; end class Document < ContentBlock; end class Video < ContentBlock; end class ToolUse < ContentBlock; end class ToolResult < ContentBlock; end class GuardContent < ContentBlock; end class Unknown < ContentBlock; end end |
#guard_content ⇒ Types::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*. </p>
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275 class ContentBlock < Struct.new( :text, :image, :document, :video, :tool_use, :tool_result, :guard_content, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class Text < ContentBlock; end class Image < ContentBlock; end class Document < ContentBlock; end class Video < ContentBlock; end class ToolUse < ContentBlock; end class ToolResult < ContentBlock; end class GuardContent < ContentBlock; end class Unknown < ContentBlock; end end |
#image ⇒ Types::ImageBlock
Image to include in the message.
<note markdown=“1”> This field is only supported by Anthropic Claude 3 models.
</note>
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275 class ContentBlock < Struct.new( :text, :image, :document, :video, :tool_use, :tool_result, :guard_content, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class Text < ContentBlock; end class Image < ContentBlock; end class Document < ContentBlock; end class Video < ContentBlock; end class ToolUse < ContentBlock; end class ToolResult < ContentBlock; end class GuardContent < ContentBlock; end class Unknown < ContentBlock; end end |
#text ⇒ String
Text to include in the message.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275 class ContentBlock < Struct.new( :text, :image, :document, :video, :tool_use, :tool_result, :guard_content, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class Text < ContentBlock; end class Image < ContentBlock; end class Document < ContentBlock; end class Video < ContentBlock; end class ToolUse < ContentBlock; end class ToolResult < ContentBlock; end class GuardContent < ContentBlock; end class Unknown < ContentBlock; end end |
#tool_result ⇒ Types::ToolResultBlock
The result for a tool request that a model makes.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275 class ContentBlock < Struct.new( :text, :image, :document, :video, :tool_use, :tool_result, :guard_content, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class Text < ContentBlock; end class Image < ContentBlock; end class Document < ContentBlock; end class Video < ContentBlock; end class ToolUse < ContentBlock; end class ToolResult < ContentBlock; end class GuardContent < ContentBlock; end class Unknown < ContentBlock; end end |
#tool_use ⇒ Types::ToolUseBlock
Information about a tool use request from a model.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275 class ContentBlock < Struct.new( :text, :image, :document, :video, :tool_use, :tool_result, :guard_content, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class Text < ContentBlock; end class Image < ContentBlock; end class Document < ContentBlock; end class Video < ContentBlock; end class ToolUse < ContentBlock; end class ToolResult < ContentBlock; end class GuardContent < ContentBlock; end class Unknown < ContentBlock; end end |
#unknown ⇒ Object
Returns the value of attribute unknown
275 276 277 |
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275 def unknown @unknown end |
#video ⇒ Types::VideoBlock
Video to include in the message.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/aws-sdk-bedrockruntime/types.rb', line 275 class ContentBlock < Struct.new( :text, :image, :document, :video, :tool_use, :tool_result, :guard_content, :unknown) SENSITIVE = [] include Aws::Structure include Aws::Structure::Union class Text < ContentBlock; end class Image < ContentBlock; end class Document < ContentBlock; end class Video < ContentBlock; end class ToolUse < ContentBlock; end class ToolResult < ContentBlock; end class GuardContent < ContentBlock; end class Unknown < ContentBlock; end end |