@cdklabs/generative-ai-cdk-constructs
@cdklabs/generative-ai-cdk-constructs / bedrock / PromptOverrideConfiguration
readonly
optional
parser:IFunction
The custom Lambda parser function to use. The Lambda parser processes and interprets the raw foundation model output. It receives an input event with:
- messageVersion: Version of message format (1.0)
- agent: Info about the agent (name, id, alias, version)
- invokeModelRawResponse: Raw model output to parse
- promptType: Type of prompt being parsed
- overrideType: Type of override (OUTPUT_PARSER)
The Lambda must return a response that the agent uses for next actions.
https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html
readonly
optional
steps:PromptStepConfigurationCustomParser
[]
The prompt configurations to override the prompt templates in the agent sequence.
- No prompt configuration will be overridden.
_render():
PromptOverrideConfigurationProperty
Internal
Format as CfnAgent.PromptOverrideConfigurationProperty
This is an internal core function and should not be called directly.
PromptOverrideConfigurationProperty
static
fromSteps(steps
?):PromptOverrideConfiguration
static
withCustomParser(props
):PromptOverrideConfiguration
Creates a PromptOverrideConfiguration with a custom Lambda parser function.
Configuration including:
parser
: Lambda function to use as custom parsersteps
: prompt step configurations. At least one of the steps must make use of the custom parser.