interface PromptPreProcessingConfigCustomParser
| Language | Type name | 
|---|---|
|  .NET | Amazon.CDK.AWS.Bedrock.Alpha.PromptPreProcessingConfigCustomParser | 
|  Go | github.com/aws/aws-cdk-go/awsbedrockalpha/v2#PromptPreProcessingConfigCustomParser | 
|  Java | software.amazon.awscdk.services.bedrock.alpha.PromptPreProcessingConfigCustomParser | 
|  Python | aws_cdk.aws_bedrock_alpha.PromptPreProcessingConfigCustomParser | 
|  TypeScript (source) | @aws-cdk/aws-bedrock-alphaยปPromptPreProcessingConfigCustomParser | 
Configuration for the pre-processing step.
Example
const parserFunction = new lambda.Function(this, 'ParserFunction', {
  runtime: lambda.Runtime.PYTHON_3_10,
  handler: 'index.handler',
  code: lambda.Code.fromAsset('lambda'),
});
const agent = new bedrock.Agent(this, 'Agent', {
  foundationModel: bedrock.BedrockFoundationModel.AMAZON_NOVA_LITE_V1,
  instruction: 'You are a helpful assistant.',
  promptOverrideConfiguration: bedrock.PromptOverrideConfiguration.withCustomParser({
    parser: parserFunction,
    preProcessingStep: {
      stepType: bedrock.AgentStepType.PRE_PROCESSING,
      useCustomParser: true
    }
  })
});
Properties
| Name | Type | Description | 
|---|---|---|
| step | Agent | The type of step this configuration applies to. | 
| custom | string | The custom prompt template to be used. | 
| inference | Inference | The inference configuration parameters to use. | 
| step | boolean | Whether to enable or skip this step in the agent sequence. | 
| use | boolean | Whether to use the custom Lambda parser defined for the sequence. | 
stepType
Type:
Agent
The type of step this configuration applies to.
customPromptTemplate?
Type:
string
(optional, default: The default prompt template will be used.)
The custom prompt template to be used.
See also: https://docs.aws.amazon.com/bedrock/latest/userguide/prompt-placeholders.html
inferenceConfig?
Type:
Inference
(optional, default: undefined - Default inference configuration will be used)
The inference configuration parameters to use.
stepEnabled?
Type:
boolean
*(optional, default: The default state for each step type is as follows.
PRE_PROCESSING โ ENABLED ORCHESTRATION โ ENABLED KNOWLEDGE_BASE_RESPONSE_GENERATION โ ENABLED POST_PROCESSING โ DISABLED)*
Whether to enable or skip this step in the agent sequence.
useCustomParser?
Type:
boolean
(optional, default: false)
Whether to use the custom Lambda parser defined for the sequence.
