Class PromptConfiguration
- All Implemented Interfaces:
Serializable
,SdkPojo
,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:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal Document
If the Converse or ConverseStream operations support the model,additionalModelRequestFields
contains additional inference parameters, beyond the base set of inference parameters in theinferenceConfiguration
field.final String
Defines the prompt template with which to replace the default prompt template.static PromptConfiguration.Builder
builder()
final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final String
The foundation model to use.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
final InferenceConfiguration
Contains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by thepromptType
.final CreationMode
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
.final String
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
.final CreationMode
Specifies whether to override the default prompt template for thispromptType
.final String
Specifies whether to override the default prompt template for thispromptType
.final PromptState
Specifies whether to allow the inline agent to carry out the step specified in thepromptType
.final String
Specifies whether to allow the inline agent to carry out the step specified in thepromptType
.final PromptType
The step in the agent sequence that this prompt configuration applies to.final String
The step in the agent sequence that this prompt configuration applies to.static Class
<? extends PromptConfiguration.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
additionalModelRequestFields
If the Converse or ConverseStream operations support the model,
additionalModelRequestFields
contains additional inference parameters, beyond the base set of inference parameters in theinferenceConfiguration
field.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,
additionalModelRequestFields
contains additional inference parameters, beyond the base set of inference parameters in theinferenceConfiguration
field.For more information, see Inference request parameters and response fields for foundation models in the Amazon Bedrock user guide.
-
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
The foundation model to use.
- Returns:
- The foundation model to use.
-
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
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
, theoverrideLambda
field 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,
parserMode
will 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
, theoverrideLambda
field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. - See Also:
-
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
, theoverrideLambda
field 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,
parserMode
will 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
, theoverrideLambda
field in the PromptOverrideConfiguration must be specified with the ARN of a Lambda function. - See Also:
-
promptCreationMode
Specifies whether to override the default prompt template for this
promptType
. Set this value toOVERRIDDEN
to 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,
promptCreationMode
will 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 toOVERRIDDEN
to use the prompt that you provide in thebasePromptTemplate
. If you leave it asDEFAULT
, the agent uses a default prompt template. - See Also:
-
promptCreationModeAsString
Specifies whether to override the default prompt template for this
promptType
. Set this value toOVERRIDDEN
to 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,
promptCreationMode
will 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 toOVERRIDDEN
to use the prompt that you provide in thebasePromptTemplate
. If you leave it asDEFAULT
, the agent uses a default prompt template. - See Also:
-
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 eachpromptType
is 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,
promptState
will 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 eachpromptType
is as follows.-
PRE_PROCESSING
–ENABLED
-
ORCHESTRATION
–ENABLED
-
KNOWLEDGE_BASE_RESPONSE_GENERATION
–ENABLED
-
POST_PROCESSING
–DISABLED
-
- See Also:
-
-
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 eachpromptType
is 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,
promptState
will 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 eachpromptType
is as follows.-
PRE_PROCESSING
–ENABLED
-
ORCHESTRATION
–ENABLED
-
KNOWLEDGE_BASE_RESPONSE_GENERATION
–ENABLED
-
POST_PROCESSING
–DISABLED
-
- See Also:
-
-
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,
promptType
will 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:
-
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,
promptType
will 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:
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<PromptConfiguration.Builder,
PromptConfiguration> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToField
in interfaceSdkPojo
- Returns:
- The mapping between the field name and its corresponding field.
-