Class: AWSCDK::Bedrock::CfnFlowVersion::PromptFlowNodeInlineConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Bedrock::CfnFlowVersion::PromptFlowNodeInlineConfigurationProperty
- Defined in:
- bedrock/cfn_flow_version.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::CfnFlowVersion::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.
1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 |
# File 'bedrock/cfn_flow_version.rb', line 1945 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::CfnFlowVersion::PromptTemplateConfigurationProperty.new(**template_configuration.transform_keys(&:to_sym)) : template_configuration Jsii::Type.check_type(@template_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3dWZXJzaW9uLlByb21wdFRlbXBsYXRlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "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::CfnFlowVersion::PromptInferenceConfigurationProperty.new(**inference_configuration.transform_keys(&:to_sym)) : inference_configuration Jsii::Type.check_type(@inference_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3dWZXJzaW9uLlByb21wdEluZmVyZW5jZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "inferenceConfiguration") unless @inference_configuration.nil? end |
Instance Attribute Details
#inference_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
Contains inference configurations for the prompt.
1975 1976 1977 |
# File 'bedrock/cfn_flow_version.rb', line 1975 def inference_configuration @inference_configuration end |
#model_id ⇒ String (readonly)
The unique identifier of the model or inference profile to run inference with.
1960 1961 1962 |
# File 'bedrock/cfn_flow_version.rb', line 1960 def model_id @model_id end |
#template_configuration ⇒ AWSCDK::IResolvable, AWSCDK::Bedrock::CfnFlowVersion::PromptTemplateConfigurationProperty (readonly)
Contains a prompt and variables in the prompt that can be replaced with values at runtime.
1965 1966 1967 |
# File 'bedrock/cfn_flow_version.rb', line 1965 def template_configuration @template_configuration end |
#template_type ⇒ String (readonly)
The type of prompt template.
1970 1971 1972 |
# File 'bedrock/cfn_flow_version.rb', line 1970 def template_type @template_type end |
Class Method Details
.jsii_properties ⇒ Object
1977 1978 1979 1980 1981 1982 1983 1984 |
# File 'bedrock/cfn_flow_version.rb', line 1977 def self.jsii_properties { :model_id => "modelId", :template_configuration => "templateConfiguration", :template_type => "templateType", :inference_configuration => "inferenceConfiguration", } end |
Instance Method Details
#to_jsii ⇒ Object
1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 |
# File 'bedrock/cfn_flow_version.rb', line 1986 def to_jsii result = {} result.merge!({ "modelId" => @model_id, "templateConfiguration" => @template_configuration, "templateType" => @template_type, "inferenceConfiguration" => @inference_configuration, }) result.compact end |