Class PromptTemplate
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockagentruntime.model.PromptTemplate
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<PromptTemplate.Builder,PromptTemplate>
@Generated("software.amazon.awssdk:codegen") public final class PromptTemplate extends Object implements SdkPojo, Serializable, ToCopyableBuilder<PromptTemplate.Builder,PromptTemplate>
Contains the template for the prompt that's sent to the model for response generation. For more information, see Knowledge base prompt templates.
This data type is used in the following API operations:
-
RetrieveAndGenerate request – in the
filterfield
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePromptTemplate.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PromptTemplate.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends PromptTemplate.Builder>serializableBuilderClass()StringtextPromptTemplate()The template for the prompt that's sent to the model for response generation.PromptTemplate.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
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
-
textPromptTemplate
public final String textPromptTemplate()
The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template.
For more information, see the following resources:
- Returns:
- The template for the prompt that's sent to the model for response generation. You can include prompt
placeholders, which become replaced before the prompt is sent to the model to provide instructions and
context to the model. In addition, you can include XML tags to delineate meaningful sections of the
prompt template.
For more information, see the following resources:
-
toBuilder
public PromptTemplate.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<PromptTemplate.Builder,PromptTemplate>
-
builder
public static PromptTemplate.Builder builder()
-
serializableBuilderClass
public static Class<? extends PromptTemplate.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.
-
sdkFieldNameToField
public final Map<String,SdkField<?>> sdkFieldNameToField()
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-
-