ContentBlock
module-attribute
¶
ContentBlock = Union[ContentBlockText | ContentBlockImage | ContentBlockDocument | ContentBlockVideo | ContentBlockToolUse | ContentBlockToolResult | ContentBlockGuardContent | ContentBlockCachePoint | ContentBlockReasoningContent | ContentBlockCitationsContent | ContentBlockUnknown]
A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.
Union Members¶
ContentBlockText
dataclass
¶
Text to include in the message.
Source code in src/aws_sdk_bedrock_runtime/models.py
8098 8099 8100 8101 8102 8103 8104 8105 8106 8107 8108 8109 8110 8111 8112 8113 8114 | |
ContentBlockImage
dataclass
¶
Image to include in the message.
Note
This field is only supported by Anthropic Claude 3 models.
Source code in src/aws_sdk_bedrock_runtime/models.py
8117 8118 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 8130 8131 8132 8133 8134 8135 | |
ContentBlockDocument
dataclass
¶
A document to include in the message.
Source code in src/aws_sdk_bedrock_runtime/models.py
8138 8139 8140 8141 8142 8143 8144 8145 8146 8147 8148 8149 8150 8151 8152 | |
ContentBlockVideo
dataclass
¶
Video to include in the message.
Source code in src/aws_sdk_bedrock_runtime/models.py
8155 8156 8157 8158 8159 8160 8161 8162 8163 8164 8165 8166 8167 8168 8169 | |
ContentBlockToolUse
dataclass
¶
Information about a tool use request from a model.
Source code in src/aws_sdk_bedrock_runtime/models.py
8172 8173 8174 8175 8176 8177 8178 8179 8180 8181 8182 8183 8184 8185 8186 | |
ContentBlockToolResult
dataclass
¶
The result for a tool request that a model makes.
Source code in src/aws_sdk_bedrock_runtime/models.py
8189 8190 8191 8192 8193 8194 8195 8196 8197 8198 8199 8200 8201 8202 8203 | |
ContentBlockGuardContent
dataclass
¶
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.
Source code in src/aws_sdk_bedrock_runtime/models.py
8206 8207 8208 8209 8210 8211 8212 8213 8214 8215 8216 8217 8218 8219 8220 8221 8222 8223 8224 8225 8226 8227 8228 8229 8230 | |
ContentBlockCachePoint
dataclass
¶
CachePoint to include in the message.
Source code in src/aws_sdk_bedrock_runtime/models.py
8233 8234 8235 8236 8237 8238 8239 8240 8241 8242 8243 8244 8245 8246 8247 | |
ContentBlockReasoningContent
dataclass
¶
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.
Source code in src/aws_sdk_bedrock_runtime/models.py
8250 8251 8252 8253 8254 8255 8256 8257 8258 8259 8260 8261 8262 8263 8264 8265 8266 8267 8268 8269 | |
ContentBlockCitationsContent
dataclass
¶
A content block that contains both generated text and associated citation information, providing traceability between the response and source documents.
Source code in src/aws_sdk_bedrock_runtime/models.py
8272 8273 8274 8275 8276 8277 8278 8279 8280 8281 8282 8283 8284 8285 8286 8287 8288 8289 8290 8291 | |
ContentBlockUnknown
dataclass
¶
Represents an unknown variant.
If you receive this value, you will need to update your library to receive the parsed value.
This value may not be deliberately sent.
Source code in src/aws_sdk_bedrock_runtime/models.py
8294 8295 8296 8297 8298 8299 8300 8301 8302 8303 8304 8305 8306 8307 8308 8309 8310 8311 8312 8313 8314 | |