Interface CfnFlowVersion.FlowNodeConfigurationProperty
- All Superinterfaces:
software.amazon.jsii.JsiiSerializable
- All Known Implementing Classes:
CfnFlowVersion.FlowNodeConfigurationProperty.Jsii$Proxy
- Enclosing class:
CfnFlowVersion
For more information, see Node types in a flow 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 software.amazon.awscdk.services.bedrock.*;
Object additionalModelRequestFields;
Object collector;
FlowNodeConfigurationProperty flowNodeConfigurationProperty_;
Object input;
Object iterator;
Object loopInput;
Object output;
FlowNodeConfigurationProperty flowNodeConfigurationProperty = FlowNodeConfigurationProperty.builder()
.agent(AgentFlowNodeConfigurationProperty.builder()
.agentAliasArn("agentAliasArn")
.build())
.collector(collector)
.condition(ConditionFlowNodeConfigurationProperty.builder()
.conditions(List.of(FlowConditionProperty.builder()
.name("name")
// the properties below are optional
.expression("expression")
.build()))
.build())
.inlineCode(InlineCodeFlowNodeConfigurationProperty.builder()
.code("code")
.language("language")
.build())
.input(input)
.iterator(iterator)
.knowledgeBase(KnowledgeBaseFlowNodeConfigurationProperty.builder()
.knowledgeBaseId("knowledgeBaseId")
// the properties below are optional
.guardrailConfiguration(GuardrailConfigurationProperty.builder()
.guardrailIdentifier("guardrailIdentifier")
.guardrailVersion("guardrailVersion")
.build())
.inferenceConfiguration(PromptInferenceConfigurationProperty.builder()
.text(PromptModelInferenceConfigurationProperty.builder()
.maxTokens(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topP(123)
.build())
.build())
.modelId("modelId")
.numberOfResults(123)
.orchestrationConfiguration(KnowledgeBaseOrchestrationConfigurationProperty.builder()
.additionalModelRequestFields(additionalModelRequestFields)
.inferenceConfig(PromptInferenceConfigurationProperty.builder()
.text(PromptModelInferenceConfigurationProperty.builder()
.maxTokens(123)
.stopSequences(List.of("stopSequences"))
.temperature(123)
.topP(123)
.build())
.build())
.performanceConfig(PerformanceConfigurationProperty.builder()
.latency("latency")
.build())
.promptTemplate(KnowledgeBasePromptTemplateProperty.builder()
.textPromptTemplate("textPromptTemplate")
.build())
.build())
.promptTemplate(KnowledgeBasePromptTemplateProperty.builder()
.textPromptTemplate("textPromptTemplate")
.build())
.rerankingConfiguration(VectorSearchRerankingConfigurationProperty.builder()
.type("type")
// the properties below are optional
.bedrockRerankingConfiguration(VectorSearchBedrockRerankingConfigurationProperty.builder()
.modelConfiguration(VectorSearchBedrockRerankingModelConfigurationProperty.builder()
.modelArn("modelArn")
// the properties below are optional
.additionalModelRequestFields(additionalModelRequestFields)
.build())
// the properties below are optional
.metadataConfiguration(MetadataConfigurationForRerankingProperty.builder()
.selectionMode("selectionMode")
// the properties below are optional
.selectiveModeConfiguration(RerankingMetadataSelectiveModeConfigurationProperty.builder()
.fieldsToExclude(List.of(FieldForRerankingProperty.builder()
.fieldName("fieldName")
.build()))
.fieldsToInclude(List.of(FieldForRerankingProperty.builder()
.fieldName("fieldName")
.build()))
.build())
.build())
.numberOfRerankedResults(123)
.build())
.build())
.build())
.lambdaFunction(LambdaFunctionFlowNodeConfigurationProperty.builder()
.lambdaArn("lambdaArn")
.build())
.lex(LexFlowNodeConfigurationProperty.builder()
.botAliasArn("botAliasArn")
.localeId("localeId")
.build())
.loop(LoopFlowNodeConfigurationProperty.builder()
.definition(FlowDefinitionProperty.builder()
.connections(List.of(FlowConnectionProperty.builder()
.name("name")
.source("source")
.target("target")
.type("type")
// the properties below are optional
.configuration(FlowConnectionConfigurationProperty.builder()
.conditional(FlowConditionalConnectionConfigurationProperty.builder()
.condition("condition")
.build())
.data(FlowDataConnectionConfigurationProperty.builder()
.sourceOutput("sourceOutput")
.targetInput("targetInput")
.build())
.build())
.build()))
.nodes(List.of(FlowNodeProperty.builder()
.name("name")
.type("type")
// the properties below are optional
.configuration(flowNodeConfigurationProperty_)
.inputs(List.of(FlowNodeInputProperty.builder()
.expression("expression")
.name("name")
.type("type")
.build()))
.outputs(List.of(FlowNodeOutputProperty.builder()
.name("name")
.type("type")
.build()))
.build()))
.build())
.build())
.loopController(LoopControllerFlowNodeConfigurationProperty.builder()
.continueCondition(FlowConditionProperty.builder()
.name("name")
// the properties below are optional
.expression("expression")
.build())
// the properties below are optional
.maxIterations(123)
.build())
.loopInput(loopInput)
.output(output)
.prompt(PromptFlowNodeConfigurationProperty.builder()
.sourceConfiguration(PromptFlowNodeSourceConfigurationProperty.builder()
.inline(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())
.resource(PromptFlowNodeResourceConfigurationProperty.builder()
.promptArn("promptArn")
.build())
.build())
// the properties below are optional
.guardrailConfiguration(GuardrailConfigurationProperty.builder()
.guardrailIdentifier("guardrailIdentifier")
.guardrailVersion("guardrailVersion")
.build())
.build())
.retrieval(RetrievalFlowNodeConfigurationProperty.builder()
.serviceConfiguration(RetrievalFlowNodeServiceConfigurationProperty.builder()
.s3(RetrievalFlowNodeS3ConfigurationProperty.builder()
.bucketName("bucketName")
.build())
.build())
.build())
.storage(StorageFlowNodeConfigurationProperty.builder()
.serviceConfiguration(StorageFlowNodeServiceConfigurationProperty.builder()
.s3(StorageFlowNodeS3ConfigurationProperty.builder()
.bucketName("bucketName")
.build())
.build())
.build())
.build();
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classA builder forCfnFlowVersion.FlowNodeConfigurationPropertystatic final classAn implementation forCfnFlowVersion.FlowNodeConfigurationProperty -
Method Summary
Modifier and TypeMethodDescriptionbuilder()default ObjectgetAgent()Contains configurations for an agent node in your flow.default ObjectContains configurations for a collector node in your flow.default ObjectContains configurations for a condition node in your flow.default ObjectContains configurations for an inline code node in your flow.default ObjectgetInput()Contains configurations for an input flow node in your flow.default ObjectContains configurations for an iterator node in your flow.default ObjectContains configurations for a knowledge base node in your flow.default ObjectContains configurations for a Lambda function node in your flow.default ObjectgetLex()Contains configurations for a Lex node in your flow.default ObjectgetLoop()Contains configurations for a DoWhile loop in your flow.default ObjectContains controller node configurations for a DoWhile loop in your flow.default ObjectContains input node configurations for a DoWhile loop in your flow.default ObjectContains configurations for an output flow node in your flow.default ObjectContains configurations for a prompt node in your flow.default ObjectContains configurations for a retrieval node in your flow.default ObjectContains configurations for a storage node in your flow.Methods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Method Details
-
getAgent
Contains configurations for an agent node in your flow.Invokes an alias of an agent and returns the response.
Returns union: either
IResolvableorCfnFlowVersion.AgentFlowNodeConfigurationProperty- See Also:
-
getCollector
Contains configurations for a collector node in your flow.Collects an iteration of inputs and consolidates them into an array of outputs.
- See Also:
-
getCondition
Contains configurations for a condition node in your flow.Defines conditions that lead to different branches of the flow.
Returns union: either
IResolvableorCfnFlowVersion.ConditionFlowNodeConfigurationProperty- See Also:
-
getInlineCode
Contains configurations for an inline code node in your flow.Inline code nodes let you write and execute code directly within your flow, enabling data transformations, custom logic, and integrations without needing an external Lambda function.
Returns union: either
IResolvableorCfnFlowVersion.InlineCodeFlowNodeConfigurationProperty- See Also:
-
getInput
Contains configurations for an input flow node in your flow.The first node in the flow.
inputscan't be specified for this node.- See Also:
-
getIterator
Contains configurations for an iterator node in your flow.Takes an input that is an array and iteratively sends each item of the array as an output to the following node. The size of the array is also returned in the output.
The output flow node at the end of the flow iteration will return a response for each member of the array. To return only one response, you can include a collector node downstream from the iterator node.
- See Also:
-
getKnowledgeBase
Contains configurations for a knowledge base node in your flow.Queries a knowledge base and returns the retrieved results or generated response.
Returns union: either
IResolvableorCfnFlowVersion.KnowledgeBaseFlowNodeConfigurationProperty- See Also:
-
getLambdaFunction
Contains configurations for a Lambda function node in your flow.Invokes an AWS Lambda function.
Returns union: either
IResolvableorCfnFlowVersion.LambdaFunctionFlowNodeConfigurationProperty- See Also:
-
getLex
Contains configurations for a Lex node in your flow.Invokes an Amazon Lex bot to identify the intent of the input and return the intent as the output.
Returns union: either
IResolvableorCfnFlowVersion.LexFlowNodeConfigurationProperty- See Also:
-
getLoop
Contains configurations for a DoWhile loop in your flow.Returns union: either
IResolvableorCfnFlowVersion.LoopFlowNodeConfigurationProperty- See Also:
-
getLoopController
Contains controller node configurations for a DoWhile loop in your flow.Returns union: either
IResolvableorCfnFlowVersion.LoopControllerFlowNodeConfigurationProperty- See Also:
-
getLoopInput
Contains input node configurations for a DoWhile loop in your flow.- See Also:
-
getOutput
Contains configurations for an output flow node in your flow.The last node in the flow.
outputscan't be specified for this node.- See Also:
-
getPrompt
Contains configurations for a prompt node in your flow.Runs a prompt and generates the model response as the output. You can use a prompt from Prompt management or you can configure one in this node.
Returns union: either
IResolvableorCfnFlowVersion.PromptFlowNodeConfigurationProperty- See Also:
-
getRetrieval
Contains configurations for a retrieval node in your flow.Retrieves data from an Amazon S3 location and returns it as the output.
Returns union: either
IResolvableorCfnFlowVersion.RetrievalFlowNodeConfigurationProperty- See Also:
-
getStorage
Contains configurations for a storage node in your flow.Stores an input in an Amazon S3 location.
Returns union: either
IResolvableorCfnFlowVersion.StorageFlowNodeConfigurationProperty- See Also:
-
builder
-