Class: AWSCDK::Bedrock::CfnFlow::PromptFlowNodeInlineConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnFlow::PromptFlowNodeInlineConfigurationProperty
- Defined in:
- bedrock/cfn_flow.rb
Overview
Contains configurations for a prompt defined inline in the node.
Instance Attribute Summary collapse
-
#inference_configuration ⇒ AWSCDK::IResolvable, ...
readonly
Contains inference configurations for the prompt.
-
#model_id ⇒ String
readonly
The unique identifier of the model or inference profile to run inference with.
-
#template_configuration ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnFlow::PromptTemplateConfigurationProperty
readonly
Contains a prompt and variables in the prompt that can be replaced with values at runtime.
-
#template_type ⇒ String
readonly
The type of prompt template.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(model_id:, template_configuration:, template_type:, inference_configuration: nil) ⇒ PromptFlowNodeInlineConfigurationProperty
constructor
A new instance of PromptFlowNodeInlineConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(model_id:, template_configuration:, template_type:, inference_configuration: nil) ⇒ PromptFlowNodeInlineConfigurationProperty
Returns a new instance of PromptFlowNodeInlineConfigurationProperty.
2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 |
# File 'bedrock/cfn_flow.rb', line 2124 def initialize(model_id:, template_configuration:, template_type:, inference_configuration: nil) @model_id = model_id Jsii::Type.check_type(@model_id, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "modelId") @template_configuration = template_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::PromptTemplateConfigurationProperty.new(**template_configuration.transform_keys(&:to_sym)) : template_configuration Jsii::Type.check_type(@template_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuUHJvbXB0VGVtcGxhdGVDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "templateConfiguration") @template_type = template_type Jsii::Type.check_type(@template_type, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "templateType") @inference_configuration = inference_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlow::PromptInferenceConfigurationProperty.new(**inference_configuration.transform_keys(&:to_sym)) : inference_configuration Jsii::Type.check_type(@inference_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3cuUHJvbXB0SW5mZXJlbmNlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "inferenceConfiguration") unless @inference_configuration.nil? end |
Instance Attribute Details
#inference_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
Contains inference configurations for the prompt.
2154 2155 2156 |
# File 'bedrock/cfn_flow.rb', line 2154 def inference_configuration @inference_configuration end |
#model_id ⇒ String (readonly)
The unique identifier of the model or inference profile to run inference with.
2139 2140 2141 |
# File 'bedrock/cfn_flow.rb', line 2139 def model_id @model_id end |
#template_configuration ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnFlow::PromptTemplateConfigurationProperty (readonly)
Contains a prompt and variables in the prompt that can be replaced with values at runtime.
2144 2145 2146 |
# File 'bedrock/cfn_flow.rb', line 2144 def template_configuration @template_configuration end |
#template_type ⇒ String (readonly)
The type of prompt template.
2149 2150 2151 |
# File 'bedrock/cfn_flow.rb', line 2149 def template_type @template_type end |
Class Method Details
.jsii_properties ⇒ Object
2156 2157 2158 2159 2160 2161 2162 2163 |
# File 'bedrock/cfn_flow.rb', line 2156 def self.jsii_properties { :model_id => "modelId", :template_configuration => "templateConfiguration", :template_type => "templateType", :inference_configuration => "inferenceConfiguration", } end |
Instance Method Details
#to_jsii ⇒ Object
2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 |
# File 'bedrock/cfn_flow.rb', line 2165 def to_jsii result = {} result.merge!({ "modelId" => @model_id, "templateConfiguration" => @template_configuration, "templateType" => @template_type, "inferenceConfiguration" => @inference_configuration, }) result.compact end |