generative-ai-cdk-constructs

@cdklabs/generative-ai-cdk-constructs


@cdklabs/generative-ai-cdk-constructs / bedrock / PromptOverrideConfiguration

Class: PromptOverrideConfiguration

Properties

parser?

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:

The Lambda must return a response that the agent uses for next actions.

See

https://docs.aws.amazon.com/bedrock/latest/userguide/lambda-parser.html


steps?

readonly optional steps: PromptStepConfigurationCustomParser[]

The prompt configurations to override the prompt templates in the agent sequence.

Default

- No prompt configuration will be overridden.

Methods

_render()

_render(): PromptOverrideConfigurationProperty

Internal

Format as CfnAgent.PromptOverrideConfigurationProperty

This is an internal core function and should not be called directly.

Returns

PromptOverrideConfigurationProperty


fromSteps()

static fromSteps(steps?): PromptOverrideConfiguration

Parameters

steps?

PromptStepConfiguration[]

Returns

PromptOverrideConfiguration


withCustomParser()

static withCustomParser(props): PromptOverrideConfiguration

Creates a PromptOverrideConfiguration with a custom Lambda parser function.

Parameters

props

CustomParserProps

Configuration including:

Returns

PromptOverrideConfiguration