Interface ContentBlock.Builder
-
- All Superinterfaces:
Buildable,CopyableBuilder<ContentBlock.Builder,ContentBlock>,SdkBuilder<ContentBlock.Builder,ContentBlock>,SdkPojo
- Enclosing class:
- ContentBlock
@Mutable @NotThreadSafe public static interface ContentBlock.Builder extends SdkPojo, CopyableBuilder<ContentBlock.Builder,ContentBlock>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ContentBlock.BuildercachePoint(Consumer<CachePointBlock.Builder> cachePoint)CachePoint to include in the message.ContentBlock.BuildercachePoint(CachePointBlock cachePoint)CachePoint to include in the message.default ContentBlock.Builderdocument(Consumer<DocumentBlock.Builder> document)A document to include in the message.ContentBlock.Builderdocument(DocumentBlock document)A document to include in the message.default ContentBlock.BuilderguardContent(Consumer<GuardrailConverseContentBlock.Builder> guardContent)Contains the content to assess with the guardrail.ContentBlock.BuilderguardContent(GuardrailConverseContentBlock guardContent)Contains the content to assess with the guardrail.default ContentBlock.Builderimage(Consumer<ImageBlock.Builder> image)Image to include in the message.ContentBlock.Builderimage(ImageBlock image)Image to include in the message.default ContentBlock.BuilderreasoningContent(Consumer<ReasoningContentBlock.Builder> reasoningContent)Contains content regarding the reasoning that is carried out by the model.ContentBlock.BuilderreasoningContent(ReasoningContentBlock reasoningContent)Contains content regarding the reasoning that is carried out by the model.ContentBlock.Buildertext(String text)Text to include in the message.default ContentBlock.BuildertoolResult(Consumer<ToolResultBlock.Builder> toolResult)The result for a tool request that a model makes.ContentBlock.BuildertoolResult(ToolResultBlock toolResult)The result for a tool request that a model makes.default ContentBlock.BuildertoolUse(Consumer<ToolUseBlock.Builder> toolUse)Information about a tool use request from a model.ContentBlock.BuildertoolUse(ToolUseBlock toolUse)Information about a tool use request from a model.default ContentBlock.Buildervideo(Consumer<VideoBlock.Builder> video)Video to include in the message.ContentBlock.Buildervideo(VideoBlock video)Video to include in the message.-
Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copy
-
Methods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, build
-
Methods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
-
-
-
Method Detail
-
text
ContentBlock.Builder text(String text)
Text to include in the message.
- Parameters:
text- Text to include in the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
image
ContentBlock.Builder image(ImageBlock image)
Image to include in the message.
This field is only supported by Anthropic Claude 3 models.
- Parameters:
image- Image to include in the message.This field is only supported by Anthropic Claude 3 models.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
image
default ContentBlock.Builder image(Consumer<ImageBlock.Builder> image)
Image to include in the message.
This is a convenience method that creates an instance of theThis field is only supported by Anthropic Claude 3 models.
ImageBlock.Builderavoiding the need to create one manually viaImageBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toimage(ImageBlock).- Parameters:
image- a consumer that will call methods onImageBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
image(ImageBlock)
-
document
ContentBlock.Builder document(DocumentBlock document)
A document to include in the message.
- Parameters:
document- A document to include in the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
document
default ContentBlock.Builder document(Consumer<DocumentBlock.Builder> document)
A document to include in the message.
This is a convenience method that creates an instance of theDocumentBlock.Builderavoiding the need to create one manually viaDocumentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed todocument(DocumentBlock).- Parameters:
document- a consumer that will call methods onDocumentBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
document(DocumentBlock)
-
video
ContentBlock.Builder video(VideoBlock video)
Video to include in the message.
- Parameters:
video- Video to include in the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
video
default ContentBlock.Builder video(Consumer<VideoBlock.Builder> video)
Video to include in the message.
This is a convenience method that creates an instance of theVideoBlock.Builderavoiding the need to create one manually viaVideoBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tovideo(VideoBlock).- Parameters:
video- a consumer that will call methods onVideoBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
video(VideoBlock)
-
toolUse
ContentBlock.Builder toolUse(ToolUseBlock toolUse)
Information about a tool use request from a model.
- Parameters:
toolUse- Information about a tool use request from a model.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toolUse
default ContentBlock.Builder toolUse(Consumer<ToolUseBlock.Builder> toolUse)
Information about a tool use request from a model.
This is a convenience method that creates an instance of theToolUseBlock.Builderavoiding the need to create one manually viaToolUseBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totoolUse(ToolUseBlock).- Parameters:
toolUse- a consumer that will call methods onToolUseBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
toolUse(ToolUseBlock)
-
toolResult
ContentBlock.Builder toolResult(ToolResultBlock toolResult)
The result for a tool request that a model makes.
- Parameters:
toolResult- The result for a tool request that a model makes.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
toolResult
default ContentBlock.Builder toolResult(Consumer<ToolResultBlock.Builder> toolResult)
The result for a tool request that a model makes.
This is a convenience method that creates an instance of theToolResultBlock.Builderavoiding the need to create one manually viaToolResultBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed totoolResult(ToolResultBlock).- Parameters:
toolResult- a consumer that will call methods onToolResultBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
toolResult(ToolResultBlock)
-
guardContent
ContentBlock.Builder guardContent(GuardrailConverseContentBlock guardContent)
Contains the content to assess with the guardrail. If you don't specify
guardContentin 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>- Parameters:
guardContent- Contains the content to assess with the guardrail. If you don't specifyguardContentin 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>- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
guardContent
default ContentBlock.Builder guardContent(Consumer<GuardrailConverseContentBlock.Builder> guardContent)
Contains the content to assess with the guardrail. If you don't specify
guardContentin 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.
This is a convenience method that creates an instance of the</p>GuardrailConverseContentBlock.Builderavoiding the need to create one manually viaGuardrailConverseContentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toguardContent(GuardrailConverseContentBlock).- Parameters:
guardContent- a consumer that will call methods onGuardrailConverseContentBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
guardContent(GuardrailConverseContentBlock)
-
cachePoint
ContentBlock.Builder cachePoint(CachePointBlock cachePoint)
CachePoint to include in the message.
- Parameters:
cachePoint- CachePoint to include in the message.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
cachePoint
default ContentBlock.Builder cachePoint(Consumer<CachePointBlock.Builder> cachePoint)
CachePoint to include in the message.
This is a convenience method that creates an instance of theCachePointBlock.Builderavoiding the need to create one manually viaCachePointBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed tocachePoint(CachePointBlock).- Parameters:
cachePoint- a consumer that will call methods onCachePointBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
cachePoint(CachePointBlock)
-
reasoningContent
ContentBlock.Builder reasoningContent(ReasoningContentBlock reasoningContent)
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.
- Parameters:
reasoningContent- 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.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
reasoningContent
default ContentBlock.Builder reasoningContent(Consumer<ReasoningContentBlock.Builder> reasoningContent)
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.
This is a convenience method that creates an instance of theReasoningContentBlock.Builderavoiding the need to create one manually viaReasoningContentBlock.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toreasoningContent(ReasoningContentBlock).- Parameters:
reasoningContent- a consumer that will call methods onReasoningContentBlock.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
reasoningContent(ReasoningContentBlock)
-
-