interface PromptFlowNodeConfigurationProperty
Language | Type name |
---|---|
![]() | Amazon.CDK.aws_bedrock.CfnFlow.PromptFlowNodeConfigurationProperty |
![]() | github.com/aws/aws-cdk-go/awscdk/v2/awsbedrock#CfnFlow_PromptFlowNodeConfigurationProperty |
![]() | software.amazon.awscdk.services.bedrock.CfnFlow.PromptFlowNodeConfigurationProperty |
![]() | aws_cdk.aws_bedrock.CfnFlow.PromptFlowNodeConfigurationProperty |
![]() | aws-cdk-lib » aws_bedrock » CfnFlow » PromptFlowNodeConfigurationProperty |
Contains configurations for a prompt node in the flow.
You can use a prompt from Prompt management or you can define one in this node. If the prompt contains variables, the inputs into this node will fill in the variables. The output from this node is the response generated by the model. For more information, see Node types in Amazon Bedrock works in the Amazon Bedrock User Guide.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_bedrock as bedrock } from 'aws-cdk-lib';
const promptFlowNodeConfigurationProperty: bedrock.CfnFlow.PromptFlowNodeConfigurationProperty = {
sourceConfiguration: {
inline: {
modelId: 'modelId',
templateConfiguration: {
text: {
text: 'text',
// the properties below are optional
inputVariables: [{
name: 'name',
}],
},
},
templateType: 'templateType',
// the properties below are optional
inferenceConfiguration: {
text: {
maxTokens: 123,
stopSequences: ['stopSequences'],
temperature: 123,
topP: 123,
},
},
},
resource: {
promptArn: 'promptArn',
},
},
// the properties below are optional
guardrailConfiguration: {
guardrailIdentifier: 'guardrailIdentifier',
guardrailVersion: 'guardrailVersion',
},
};
Properties
Name | Type | Description |
---|---|---|
source | IResolvable | Prompt | Specifies whether the prompt is from Prompt management or defined inline. |
guardrail | IResolvable | Guardrail | Contains configurations for a guardrail to apply to the prompt in this node and the response generated from it. |
sourceConfiguration
Type:
IResolvable
|
Prompt
Specifies whether the prompt is from Prompt management or defined inline.
guardrailConfiguration?
Type:
IResolvable
|
Guardrail
(optional)
Contains configurations for a guardrail to apply to the prompt in this node and the response generated from it.