Class: AWSCDK::Bedrock::CfnFlow::FlowNodeConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnFlow::FlowNodeConfigurationProperty
- Defined in:
- bedrock/cfn_flow.rb
Overview
Contains configurations for a node in your flow.
For more information, see Node types in a flow in the Amazon Bedrock User Guide.
Instance Attribute Summary collapse
-
#agent ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for an agent node in your flow.
-
#collector ⇒ Object?
readonly
Contains configurations for a collector node in your flow.
-
#condition ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for a condition node in your flow.
-
#inline_code ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for an inline code node in your flow.
-
#input ⇒ Object?
readonly
Contains configurations for an input flow node in your flow.
-
#iterator ⇒ Object?
readonly
Contains configurations for an iterator node in your flow.
-
#knowledge_base ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for a knowledge base node in your flow.
-
#lambda_function ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for a Lambda function node in your flow.
-
#lex ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for a Lex node in your flow.
-
#loop ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for a DoWhile loop in your flow.
-
#loop_controller ⇒ AWSCDK::IResolvable, ...
readonly
Contains controller node configurations for a DoWhile loop in your flow.
-
#loop_input ⇒ Object?
readonly
Contains input node configurations for a DoWhile loop in your flow.
-
#output ⇒ Object?
readonly
Contains configurations for an output flow node in your flow.
-
#prompt ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for a prompt node in your flow.
-
#retrieval ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for a retrieval node in your flow.
-
#storage ⇒ AWSCDK::IResolvable, ...
readonly
Contains configurations for a storage node in your flow.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(agent: nil, collector: nil, condition: nil, inline_code: nil, input: nil, iterator: nil, knowledge_base: nil, lambda_function: nil, lex: nil, loop: nil, loop_controller: nil, loop_input: nil, output: nil, prompt: nil, retrieval: nil, storage: nil) ⇒ FlowNodeConfigurationProperty
constructor
A new instance of FlowNodeConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(agent: nil, collector: nil, condition: nil, inline_code: nil, input: nil, iterator: nil, knowledge_base: nil, lambda_function: nil, lex: nil, loop: nil, loop_controller: nil, loop_input: nil, output: nil, prompt: nil, retrieval: nil, storage: nil) ⇒ FlowNodeConfigurationProperty
Returns a new instance of FlowNodeConfigurationProperty.
1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 |
# File 'bedrock/cfn_flow.rb', line 1106 def initialize(agent: nil, collector: nil, condition: nil, inline_code: nil, input: nil, iterator: nil, knowledge_base: nil, lambda_function: nil, lex: nil, loop: nil, loop_controller: nil, loop_input: nil, output: nil, prompt: nil, retrieval: nil, storage: nil) @agent = agent.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::AgentFlowNodeConfigurationProperty.new(**agent.transform_keys(&:to_sym)) : agent Jsii::Type.check_type(@agent, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuQWdlbnRGbG93Tm9kZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "agent") unless @agent.nil? @collector = collector Jsii::Type.check_type(@collector, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "collector") unless @collector.nil? @condition = condition.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::ConditionFlowNodeConfigurationProperty.new(**condition.transform_keys(&:to_sym)) : condition Jsii::Type.check_type(@condition, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuQ29uZGl0aW9uRmxvd05vZGVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "condition") unless @condition.nil? @inline_code = inline_code.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::InlineCodeFlowNodeConfigurationProperty.new(**inline_code.transform_keys(&:to_sym)) : inline_code Jsii::Type.check_type(@inline_code, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuSW5saW5lQ29kZUZsb3dOb2RlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "inlineCode") unless @inline_code.nil? @input = input Jsii::Type.check_type(@input, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "input") unless @input.nil? @iterator = iterator Jsii::Type.check_type(@iterator, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "iterator") unless @iterator.nil? @knowledge_base = knowledge_base.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::KnowledgeBaseFlowNodeConfigurationProperty.new(**knowledge_base.transform_keys(&:to_sym)) : knowledge_base Jsii::Type.check_type(@knowledge_base, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuS25vd2xlZGdlQmFzZUZsb3dOb2RlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "knowledgeBase") unless @knowledge_base.nil? @lambda_function = lambda_function.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::LambdaFunctionFlowNodeConfigurationProperty.new(**lambda_function.transform_keys(&:to_sym)) : lambda_function Jsii::Type.check_type(@lambda_function, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuTGFtYmRhRnVuY3Rpb25GbG93Tm9kZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "lambdaFunction") unless @lambda_function.nil? @lex = lex.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::LexFlowNodeConfigurationProperty.new(**lex.transform_keys(&:to_sym)) : lex Jsii::Type.check_type(@lex, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuTGV4Rmxvd05vZGVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "lex") unless @lex.nil? @loop = loop.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::LoopFlowNodeConfigurationProperty.new(**loop.transform_keys(&:to_sym)) : loop Jsii::Type.check_type(@loop, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuTG9vcEZsb3dOb2RlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "loop") unless @loop.nil? @loop_controller = loop_controller.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::LoopControllerFlowNodeConfigurationProperty.new(**loop_controller.transform_keys(&:to_sym)) : loop_controller Jsii::Type.check_type(@loop_controller, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuTG9vcENvbnRyb2xsZXJGbG93Tm9kZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "loopController") unless @loop_controller.nil? @loop_input = loop_input Jsii::Type.check_type(@loop_input, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "loopInput") unless @loop_input.nil? @output = output Jsii::Type.check_type(@output, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJhbnkifQ==")), "output") unless @output.nil? @prompt = prompt.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::PromptFlowNodeConfigurationProperty.new(**prompt.transform_keys(&:to_sym)) : prompt Jsii::Type.check_type(@prompt, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuUHJvbXB0Rmxvd05vZGVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "prompt") unless @prompt.nil? @retrieval = retrieval.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::RetrievalFlowNodeConfigurationProperty.new(**retrieval.transform_keys(&:to_sym)) : retrieval Jsii::Type.check_type(@retrieval, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuUmV0cmlldmFsRmxvd05vZGVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "retrieval") unless @retrieval.nil? @storage = storage.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::StorageFlowNodeConfigurationProperty.new(**storage.transform_keys(&:to_sym)) : storage Jsii::Type.check_type(@storage, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuU3RvcmFnZUZsb3dOb2RlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "storage") unless @storage.nil? end |
Instance Attribute Details
#agent ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configurations for an agent node in your flow.
Invokes an alias of an agent and returns the response.
1147 1148 1149 |
# File 'bedrock/cfn_flow.rb', line 1147 def agent @agent end |
#collector ⇒ Object? (readonly)
Contains configurations for a collector node in your flow.
Collects an iteration of inputs and consolidates them into an array of outputs.
1154 1155 1156 |
# File 'bedrock/cfn_flow.rb', line 1154 def collector @collector end |
#condition ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configurations for a condition node in your flow.
Defines conditions that lead to different branches of the flow.
1161 1162 1163 |
# File 'bedrock/cfn_flow.rb', line 1161 def condition @condition end |
#inline_code ⇒ AWSCDK::IResolvable, ... (readonly)
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.
1168 1169 1170 |
# File 'bedrock/cfn_flow.rb', line 1168 def inline_code @inline_code end |
#input ⇒ Object? (readonly)
Contains configurations for an input flow node in your flow.
The first node in the flow. inputs can't be specified for this node.
1175 1176 1177 |
# File 'bedrock/cfn_flow.rb', line 1175 def input @input end |
#iterator ⇒ Object? (readonly)
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.
1184 1185 1186 |
# File 'bedrock/cfn_flow.rb', line 1184 def iterator @iterator end |
#knowledge_base ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configurations for a knowledge base node in your flow.
Queries a knowledge base and returns the retrieved results or generated response.
1191 1192 1193 |
# File 'bedrock/cfn_flow.rb', line 1191 def knowledge_base @knowledge_base end |
#lambda_function ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configurations for a Lambda function node in your flow.
Invokes an AWS Lambda function.
1198 1199 1200 |
# File 'bedrock/cfn_flow.rb', line 1198 def lambda_function @lambda_function end |
#lex ⇒ AWSCDK::IResolvable, ... (readonly)
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.
1205 1206 1207 |
# File 'bedrock/cfn_flow.rb', line 1205 def lex @lex end |
#loop ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configurations for a DoWhile loop in your flow.
1210 1211 1212 |
# File 'bedrock/cfn_flow.rb', line 1210 def loop @loop end |
#loop_controller ⇒ AWSCDK::IResolvable, ... (readonly)
Contains controller node configurations for a DoWhile loop in your flow.
1215 1216 1217 |
# File 'bedrock/cfn_flow.rb', line 1215 def loop_controller @loop_controller end |
#loop_input ⇒ Object? (readonly)
Contains input node configurations for a DoWhile loop in your flow.
1220 1221 1222 |
# File 'bedrock/cfn_flow.rb', line 1220 def loop_input @loop_input end |
#output ⇒ Object? (readonly)
Contains configurations for an output flow node in your flow.
The last node in the flow. outputs can't be specified for this node.
1227 1228 1229 |
# File 'bedrock/cfn_flow.rb', line 1227 def output @output end |
#prompt ⇒ AWSCDK::IResolvable, ... (readonly)
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.
1234 1235 1236 |
# File 'bedrock/cfn_flow.rb', line 1234 def prompt @prompt end |
#retrieval ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configurations for a retrieval node in your flow.
Retrieves data from an Amazon S3 location and returns it as the output.
1241 1242 1243 |
# File 'bedrock/cfn_flow.rb', line 1241 def retrieval @retrieval end |
#storage ⇒ AWSCDK::IResolvable, ... (readonly)
Contains configurations for a storage node in your flow.
Stores an input in an Amazon S3 location.
1248 1249 1250 |
# File 'bedrock/cfn_flow.rb', line 1248 def storage @storage end |
Class Method Details
.jsii_properties ⇒ Object
1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 |
# File 'bedrock/cfn_flow.rb', line 1250 def self.jsii_properties { :agent => "agent", :collector => "collector", :condition => "condition", :inline_code => "inlineCode", :input => "input", :iterator => "iterator", :knowledge_base => "knowledgeBase", :lambda_function => "lambdaFunction", :lex => "lex", :loop => "loop", :loop_controller => "loopController", :loop_input => "loopInput", :output => "output", :prompt => "prompt", :retrieval => "retrieval", :storage => "storage", } end |
Instance Method Details
#to_jsii ⇒ Object
1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 |
# File 'bedrock/cfn_flow.rb', line 1271 def to_jsii result = {} result.merge!({ "agent" => @agent, "collector" => @collector, "condition" => @condition, "inlineCode" => @inline_code, "input" => @input, "iterator" => @iterator, "knowledgeBase" => @knowledge_base, "lambdaFunction" => @lambda_function, "lex" => @lex, "loop" => @loop, "loopController" => @loop_controller, "loopInput" => @loop_input, "output" => @output, "prompt" => @prompt, "retrieval" => @retrieval, "storage" => @storage, }) result.compact end |