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 StringDefines the prompt template with which to replace the default prompt template.static PromptConfiguration.Builderbuilder()final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.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 agent to carry out the step specified in thepromptType.final StringSpecifies whether to allow the 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> Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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.
-
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 asOVERRIDEN, 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 asOVERRIDEN, 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 asOVERRIDEN, 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 asOVERRIDEN, 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 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 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 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 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
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<PromptConfiguration.Builder,PromptConfiguration> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin 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:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-