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 DocumentIf the Converse or ConverseStream operations support the model,additionalModelRequestFieldscontains additional inference parameters, beyond the base set of inference parameters in theinferenceConfigurationfield.final StringDefines the prompt template with which to replace the default prompt template.static PromptConfiguration.Builderbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) final StringThe foundation model to use.final <T> Optional<T>getValueForField(String fieldName, Class<T> clazz) final inthashCode()final InferenceConfigurationContains inference parameters to use when the agent invokes a foundation model in the part of the agent sequence defined by thepromptType.final CreationModeSpecifies 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 StringSpecifies 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 CreationModeSpecifies whether to override the default prompt template for thispromptType.final StringSpecifies whether to override the default prompt template for thispromptType.final PromptStateSpecifies whether to allow the inline agent to carry out the step specified in thepromptType.final StringSpecifies whether to allow the inline agent to carry out the step specified in thepromptType.final PromptTypeThe step in the agent sequence that this prompt configuration applies to.final StringThe step in the agent sequence that this prompt configuration applies to.static Class<? extends PromptConfiguration.Builder>final StringtoString()Returns a string representation of this object.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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
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, 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:
-
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:
-
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:
-
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:
-
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:
-
-
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:
-
-
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:
-
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:
-
toBuilder
- Specified by:
toBuilderin interfaceToCopyableBuilder<PromptConfiguration.Builder,PromptConfiguration>
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
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. -
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo
-