Experimental
@aws-cdk/aws-bedrock-alpha is an experimental (alpha) package: its API may change in any release, without a major version bump.
PromptPostProcessingConfigCustomParser Struct
Configuration for the post-processing step.
| Stability | Experimental |
|---|---|
| Source | bedrock/agents/prompt-override.ts |
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as bedrock_alpha from '@aws-cdk/aws-bedrock-alpha';
const promptPostProcessingConfigCustomParser: bedrock_alpha.PromptPostProcessingConfigCustomParser = {
stepType: bedrock_alpha.AgentStepType.PRE_PROCESSING,
// the properties below are optional
customPromptTemplate: 'customPromptTemplate',
inferenceConfig: {
maximumLength: 123,
stopSequences: ['stopSequences'],
temperature: 123,
topK: 123,
topP: 123,
},
stepEnabled: false,
useCustomParser: false,
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
import aws_cdk.aws_bedrock_alpha as bedrock_alpha
prompt_post_processing_config_custom_parser = bedrock_alpha.PromptPostProcessingConfigCustomParser(
step_type=bedrock_alpha.AgentStepType.PRE_PROCESSING,
# the properties below are optional
custom_prompt_template="customPromptTemplate",
inference_config=bedrock_alpha.InferenceConfiguration(
maximum_length=123,
stop_sequences=["stopSequences"],
temperature=123,
top_k=123,
top_p=123
),
step_enabled=False,
use_custom_parser=False
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.bedrock.alpha.*;
PromptPostProcessingConfigCustomParser promptPostProcessingConfigCustomParser = PromptPostProcessingConfigCustomParser.builder()
.stepType(AgentStepType.PRE_PROCESSING)
// the properties below are optional
.customPromptTemplate("customPromptTemplate")
.inferenceConfig(InferenceConfiguration.builder()
.maximumLength(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topK(123)
.topP(123)
.build())
.stepEnabled(false)
.useCustomParser(false)
.build();
csharp
// Install: dotnet add package Amazon.CDK.AWS.Bedrock.Alpha
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock.Alpha;
var promptPostProcessingConfigCustomParser = new PromptPostProcessingConfigCustomParser {
StepType = AgentStepType.PRE_PROCESSING,
// the properties below are optional
CustomPromptTemplate = "customPromptTemplate",
InferenceConfig = new InferenceConfiguration {
MaximumLength = 123,
StopSequences = new [] { "stopSequences" },
Temperature = 123,
TopK = 123,
TopP = 123
},
StepEnabled = false,
UseCustomParser = false
};
go
// Install: go get github.com/aws/aws-cdk-go/awsbedrockalpha/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import bedrock_alpha "github.com/aws/aws-cdk-go/awsbedrockalpha"
promptPostProcessingConfigCustomParser := &PromptPostProcessingConfigCustomParser{
StepType: bedrock_alpha.AgentStepType_PRE_PROCESSING,
// the properties below are optional
CustomPromptTemplate: jsii.String("customPromptTemplate"),
InferenceConfig: &InferenceConfiguration{
MaximumLength: jsii.Number(123),
StopSequences: []*string{
jsii.String("stopSequences"),
},
Temperature: jsii.Number(123),
TopK: jsii.Number(123),
TopP: jsii.Number(123),
},
StepEnabled: jsii.Boolean(false),
UseCustomParser: jsii.Boolean(false),
}
Properties
customPromptTemplateoptionalstringcustom_prompt_templateoptionalstrcustomPromptTemplateoptionalStringCustomPromptTemplateoptionalstringCustomPromptTemplateoptional*string #The custom prompt template to be used.
Default: The default prompt template will be used.
inferenceConfigoptionalInferenceConfigurationinference_configoptionalInferenceConfigurationinferenceConfigoptionalInferenceConfigurationInferenceConfigoptionalInferenceConfigurationInferenceConfigoptionalInferenceConfiguration #The inference configuration parameters to use.
Default: undefined - Default inference configuration will be used
stepEnabledoptionalbooleanstep_enabledoptionalboolstepEnabledoptionalBooleanStepEnabledoptionalboolStepEnabledoptional*bool #Whether to enable or skip this step in the agent sequence.
Default: The default state for each step type is as follows. PRE_PROCESSING – ENABLED ORCHESTRATION – ENABLED KNOWLEDGE_BASE_RESPONSE_GENERATION – ENABLED POST_PROCESSING – DISABLED
stepTypeAgentStepTypestep_typeAgentStepTypestepTypeAgentStepTypeStepTypeAgentStepTypeStepTypeAgentStepType required #The type of step this configuration applies to.
useCustomParseroptionalbooleanuse_custom_parseroptionalbooluseCustomParseroptionalBooleanUseCustomParseroptionalboolUseCustomParseroptional*bool = false #Whether to use the custom Lambda parser defined for the sequence.