Class PromptConfiguration
- java.lang.Object
-
- software.amazon.awssdk.services.bedrockagentruntime.model.PromptConfiguration
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<PromptConfiguration.Builder,PromptConfiguration>
@Generated("software.amazon.awssdk:codegen") public final class PromptConfiguration extends Object implements SdkPojo, Serializable, ToCopyableBuilder<PromptConfiguration.Builder,PromptConfiguration>
Contains configurations to override a prompt template in one part of an agent sequence. For more information, see Advanced prompts.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePromptConfiguration.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DocumentadditionalModelRequestFields()If the Converse or ConverseStream operations support the model,additionalModelRequestFieldscontains additional inference parameters, beyond the base set of inference parameters in theinferenceConfigurationfield.StringbasePromptTemplate()Defines the prompt template with which to replace the default prompt template.static PromptConfiguration.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)StringfoundationModel()The foundation model to use.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()InferenceConfigurationinferenceConfiguration()Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by thepromptType.CreationModeparserMode()Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by thepromptType.StringparserModeAsString()Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by thepromptType.CreationModepromptCreationMode()Specifies whether to override the default prompt template for thispromptType.StringpromptCreationModeAsString()Specifies whether to override the default prompt template for thispromptType.PromptStatepromptState()Specifies whether to allow the inline agent to carry out the step specified in thepromptType.StringpromptStateAsString()Specifies whether to allow the inline agent to carry out the step specified in thepromptType.PromptTypepromptType()The step in the agent sequence that this prompt configuration applies to.StringpromptTypeAsString()The step in the agent sequence that this prompt configuration applies to.Map<String,SdkField<?>>sdkFieldNameToField()List<SdkField<?>>sdkFields()static Class<? extends PromptConfiguration.Builder>serializableBuilderClass()PromptConfiguration.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
-
additionalModelRequestFields
public final Document additionalModelRequestFields()
If the Converse or ConverseStream operations support the model,
additionalModelRequestFieldscontains additional inference parameters, beyond the base set of inference parameters in theinferenceConfigurationfield.For more information, see Inference request parameters and response fields for foundation models in the Amazon Bedrock user guide.
- Returns:
- If the Converse or ConverseStream operations support the model,
additionalModelRequestFieldscontains additional inference parameters, beyond the base set of inference parameters in theinferenceConfigurationfield.For more information, see Inference request parameters and response fields for foundation models in the Amazon Bedrock user guide.
-
basePromptTemplate
public final String basePromptTemplate()
Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates.
- Returns:
- Defines the prompt template with which to replace the default prompt template. You can use placeholder variables in the base prompt template to customize the prompt. For more information, see Prompt template placeholder variables. For more information, see Configure the prompt templates.
-
foundationModel
public final String foundationModel()
The foundation model to use.
- Returns:
- The foundation model to use.
-
inferenceConfiguration
public final InferenceConfiguration inferenceConfiguration()
Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by the
promptType. For more information, see Inference parameters for foundation models.- Returns:
- Contains inference parameters to use when the agent invokes a foundation model in the part of the agent
sequence defined by the
promptType. For more information, see Inference parameters for foundation models.
-
parserMode
public final CreationMode parserMode()
Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the
promptType. If you set the field asOVERRIDDEN, theoverrideLambdafield in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.If the service returns an enum value that is not available in the current SDK version,
parserModewill returnCreationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromparserModeAsString().- Returns:
- Specifies whether to override the default parser Lambda function when parsing the raw foundation model
output in the part of the agent sequence defined by the
promptType. If you set the field asOVERRIDDEN, theoverrideLambdafield in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. - See Also:
CreationMode
-
parserModeAsString
public final String parserModeAsString()
Specifies whether to override the default parser Lambda function when parsing the raw foundation model output in the part of the agent sequence defined by the
promptType. If you set the field asOVERRIDDEN, theoverrideLambdafield in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function.If the service returns an enum value that is not available in the current SDK version,
parserModewill returnCreationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromparserModeAsString().- Returns:
- Specifies whether to override the default parser Lambda function when parsing the raw foundation model
output in the part of the agent sequence defined by the
promptType. If you set the field asOVERRIDDEN, theoverrideLambdafield in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. - See Also:
CreationMode
-
promptCreationMode
public final CreationMode promptCreationMode()
Specifies whether to override the default prompt template for this
promptType. Set this value toOVERRIDDENto use the prompt that you provide in thebasePromptTemplate. If you leave it asDEFAULT, the agent uses a default prompt template.If the service returns an enum value that is not available in the current SDK version,
promptCreationModewill returnCreationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frompromptCreationModeAsString().- Returns:
- Specifies whether to override the default prompt template for this
promptType. Set this value toOVERRIDDENto use the prompt that you provide in thebasePromptTemplate. If you leave it asDEFAULT, the agent uses a default prompt template. - See Also:
CreationMode
-
promptCreationModeAsString
public final String promptCreationModeAsString()
Specifies whether to override the default prompt template for this
promptType. Set this value toOVERRIDDENto use the prompt that you provide in thebasePromptTemplate. If you leave it asDEFAULT, the agent uses a default prompt template.If the service returns an enum value that is not available in the current SDK version,
promptCreationModewill returnCreationMode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frompromptCreationModeAsString().- Returns:
- Specifies whether to override the default prompt template for this
promptType. Set this value toOVERRIDDENto use the prompt that you provide in thebasePromptTemplate. If you leave it asDEFAULT, the agent uses a default prompt template. - See Also:
CreationMode
-
promptState
public final PromptState promptState()
Specifies whether to allow the inline agent to carry out the step specified in the
promptType. If you set this value toDISABLED, the agent skips that step. The default state for eachpromptTypeis as follows.-
PRE_PROCESSING–ENABLED -
ORCHESTRATION–ENABLED -
KNOWLEDGE_BASE_RESPONSE_GENERATION–ENABLED -
POST_PROCESSING–DISABLED
If the service returns an enum value that is not available in the current SDK version,
promptStatewill returnPromptState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frompromptStateAsString().- Returns:
- Specifies whether to allow the inline agent to carry out the step specified in the
promptType. If you set this value toDISABLED, the agent skips that step. The default state for eachpromptTypeis as follows.-
PRE_PROCESSING–ENABLED -
ORCHESTRATION–ENABLED -
KNOWLEDGE_BASE_RESPONSE_GENERATION–ENABLED -
POST_PROCESSING–DISABLED
-
- See Also:
PromptState
-
-
promptStateAsString
public final String promptStateAsString()
Specifies whether to allow the inline agent to carry out the step specified in the
promptType. If you set this value toDISABLED, the agent skips that step. The default state for eachpromptTypeis as follows.-
PRE_PROCESSING–ENABLED -
ORCHESTRATION–ENABLED -
KNOWLEDGE_BASE_RESPONSE_GENERATION–ENABLED -
POST_PROCESSING–DISABLED
If the service returns an enum value that is not available in the current SDK version,
promptStatewill returnPromptState.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frompromptStateAsString().- Returns:
- Specifies whether to allow the inline agent to carry out the step specified in the
promptType. If you set this value toDISABLED, the agent skips that step. The default state for eachpromptTypeis as follows.-
PRE_PROCESSING–ENABLED -
ORCHESTRATION–ENABLED -
KNOWLEDGE_BASE_RESPONSE_GENERATION–ENABLED -
POST_PROCESSING–DISABLED
-
- See Also:
PromptState
-
-
promptType
public final PromptType promptType()
The step in the agent sequence that this prompt configuration applies to.
If the service returns an enum value that is not available in the current SDK version,
promptTypewill returnPromptType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frompromptTypeAsString().- Returns:
- The step in the agent sequence that this prompt configuration applies to.
- See Also:
PromptType
-
promptTypeAsString
public final String promptTypeAsString()
The step in the agent sequence that this prompt configuration applies to.
If the service returns an enum value that is not available in the current SDK version,
promptTypewill returnPromptType.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available frompromptTypeAsString().- Returns:
- The step in the agent sequence that this prompt configuration applies to.
- See Also:
PromptType
-
toBuilder
public PromptConfiguration.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<PromptConfiguration.Builder,PromptConfiguration>
-
builder
public static PromptConfiguration.Builder builder()
-
serializableBuilderClass
public static Class<? extends PromptConfiguration.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
-
-