Class ReasoningContentBlock
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockruntime.model.ReasoningContentBlock
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ReasoningContentBlock.Builder,ReasoningContentBlock>
@Generated("software.amazon.awssdk:codegen") public final class ReasoningContentBlock extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ReasoningContentBlock.Builder,ReasoningContentBlock>
Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceReasoningContentBlock.Builderstatic classReasoningContentBlock.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ReasoningContentBlock.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static ReasoningContentBlockfromReasoningText(Consumer<ReasoningTextBlock.Builder> reasoningText)Create an instance of this class withreasoningText()initialized to the given value.static ReasoningContentBlockfromReasoningText(ReasoningTextBlock reasoningText)Create an instance of this class withreasoningText()initialized to the given value.static ReasoningContentBlockfromRedactedContent(SdkBytes redactedContent)Create an instance of this class withredactedContent()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()ReasoningTextBlockreasoningText()The reasoning that the model used to return the output.SdkBytesredactedContent()The content in the reasoning that was encrypted by the model provider for safety reasons.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends ReasoningContentBlock.Builder>serializableBuilderClass()ReasoningContentBlock.BuildertoBuilder()StringtoString()Returns a string representation of this object.ReasoningContentBlock.Typetype()Retrieve an enum value representing which member of this object is populated.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
reasoningText
public final ReasoningTextBlock reasoningText()
The reasoning that the model used to return the output.
- Returns:
- The reasoning that the model used to return the output.
-
redactedContent
public final SdkBytes redactedContent()
The content in the reasoning that was encrypted by the model provider for safety reasons. The encryption doesn't affect the quality of responses.
- Returns:
- The content in the reasoning that was encrypted by the model provider for safety reasons. The encryption doesn't affect the quality of responses.
-
toBuilder
public ReasoningContentBlock.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<ReasoningContentBlock.Builder,ReasoningContentBlock>
-
builder
public static ReasoningContentBlock.Builder builder()
-
serializableBuilderClass
public static Class<? extends ReasoningContentBlock.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String toString()
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
-
fromReasoningText
public static ReasoningContentBlock fromReasoningText(ReasoningTextBlock reasoningText)
Create an instance of this class withreasoningText()initialized to the given value.The reasoning that the model used to return the output.
- Parameters:
reasoningText- The reasoning that the model used to return the output.
-
fromReasoningText
public static ReasoningContentBlock fromReasoningText(Consumer<ReasoningTextBlock.Builder> reasoningText)
Create an instance of this class withreasoningText()initialized to the given value.The reasoning that the model used to return the output.
- Parameters:
reasoningText- The reasoning that the model used to return the output.
-
fromRedactedContent
public static ReasoningContentBlock fromRedactedContent(SdkBytes redactedContent)
Create an instance of this class withredactedContent()initialized to the given value.The content in the reasoning that was encrypted by the model provider for safety reasons. The encryption doesn't affect the quality of responses.
- Parameters:
redactedContent- The content in the reasoning that was encrypted by the model provider for safety reasons. The encryption doesn't affect the quality of responses.
-
type
public ReasoningContentBlock.Type type()
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beReasoningContentBlock.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beReasoningContentBlock.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-