Skip to content
v2.276.0

PromptFlowNodeInlineConfigurationProperty Struct ​

Contains configurations for a prompt defined inline in the node.

Example ​

ts
// 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 promptFlowNodeInlineConfigurationProperty: bedrock.CfnFlowVersion.PromptFlowNodeInlineConfigurationProperty = {
  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,
    },
  },
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_bedrock as bedrock

prompt_flow_node_inline_configuration_property = bedrock.CfnFlowVersion.PromptFlowNodeInlineConfigurationProperty(
    model_id="modelId",
    template_configuration=bedrock.CfnFlowVersion.PromptTemplateConfigurationProperty(
        text=bedrock.CfnFlowVersion.TextPromptTemplateConfigurationProperty(
            text="text",

            # the properties below are optional
            input_variables=[bedrock.CfnFlowVersion.PromptInputVariableProperty(
                name="name"
            )]
        )
    ),
    template_type="templateType",

    # the properties below are optional
    inference_configuration=bedrock.CfnFlowVersion.PromptInferenceConfigurationProperty(
        text=bedrock.CfnFlowVersion.PromptModelInferenceConfigurationProperty(
            max_tokens=123,
            stop_sequences=["stopSequences"],
            temperature=123,
            top_p=123
        )
    )
)
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.*;

PromptFlowNodeInlineConfigurationProperty promptFlowNodeInlineConfigurationProperty = PromptFlowNodeInlineConfigurationProperty.builder()
        .modelId("modelId")
        .templateConfiguration(PromptTemplateConfigurationProperty.builder()
                .text(TextPromptTemplateConfigurationProperty.builder()
                        .text("text")

                        // the properties below are optional
                        .inputVariables(List.of(PromptInputVariableProperty.builder()
                                .name("name")
                                .build()))
                        .build())
                .build())
        .templateType("templateType")

        // the properties below are optional
        .inferenceConfiguration(PromptInferenceConfigurationProperty.builder()
                .text(PromptModelInferenceConfigurationProperty.builder()
                        .maxTokens(123)
                        .stopSequences(List.of("stopSequences"))
                        .temperature(123)
                        .topP(123)
                        .build())
                .build())
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Bedrock;

var promptFlowNodeInlineConfigurationProperty = new PromptFlowNodeInlineConfigurationProperty {
    ModelId = "modelId",
    TemplateConfiguration = new PromptTemplateConfigurationProperty {
        Text = new TextPromptTemplateConfigurationProperty {
            Text = "text",

            // the properties below are optional
            InputVariables = new [] { new PromptInputVariableProperty {
                Name = "name"
            } }
        }
    },
    TemplateType = "templateType",

    // the properties below are optional
    InferenceConfiguration = new PromptInferenceConfigurationProperty {
        Text = new PromptModelInferenceConfigurationProperty {
            MaxTokens = 123,
            StopSequences = new [] { "stopSequences" },
            Temperature = 123,
            TopP = 123
        }
    }
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

promptFlowNodeInlineConfigurationProperty := &PromptFlowNodeInlineConfigurationProperty{
	ModelId: jsii.String("modelId"),
	TemplateConfiguration: &PromptTemplateConfigurationProperty{
		Text: &TextPromptTemplateConfigurationProperty{
			Text: jsii.String("text"),

			// the properties below are optional
			InputVariables: []interface{}{
				&PromptInputVariableProperty{
					Name: jsii.String("name"),
				},
			},
		},
	},
	TemplateType: jsii.String("templateType"),

	// the properties below are optional
	InferenceConfiguration: &PromptInferenceConfigurationProperty{
		Text: &PromptModelInferenceConfigurationProperty{
			MaxTokens: jsii.Number(123),
			StopSequences: []*string{
				jsii.String("stopSequences"),
			},
			Temperature: jsii.Number(123),
			TopP: jsii.Number(123),
		},
	},
}

Properties ​

inferenceConfigurationoptionalIResolvable | CfnFlowVersion.PromptInferenceConfigurationPropertyinference_configurationoptionaltyping.Union[IResolvable, PromptInferenceConfigurationProperty]inferenceConfigurationoptionalIResolvableInferenceConfigurationoptionalIResolvableInferenceConfigurationoptionalinterface{}#
Contains inference configurations for the prompt.
modelIdstringmodel_idstrmodelIdStringModelIdstringModelId*stringrequired#
The unique identifier of the model or [inference profile](https://docs.aws.amazon.com/bedrock/latest/userguide/cross-region-inference.html) to run inference with.
templateConfigurationIResolvable | CfnFlowVersion.PromptTemplateConfigurationPropertytemplate_configurationtyping.Union[IResolvable, PromptTemplateConfigurationProperty]templateConfigurationIResolvableTemplateConfigurationIResolvableTemplateConfigurationinterface{}required#
Contains a prompt and variables in the prompt that can be replaced with values at runtime.
templateTypestringtemplate_typestrtemplateTypeStringTemplateTypestringTemplateType*stringrequired#
The type of prompt template.