Class: AWSCDK::Bedrock::CfnFlowVersion::PromptFlowNodeConfigurationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock/cfn_flow_version.rb

Overview

Contains configurations for a prompt node in the flow.

You can use a prompt from Prompt management or you can define one in this node. If the prompt contains variables, the inputs into this node will fill in the variables. The output from this node is the response generated by the model. For more information, see Node types in a flow in the Amazon Bedrock User Guide.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(source_configuration:, guardrail_configuration: nil) ⇒ PromptFlowNodeConfigurationProperty

Returns a new instance of PromptFlowNodeConfigurationProperty.

Parameters:



1900
1901
1902
1903
1904
1905
# File 'bedrock/cfn_flow_version.rb', line 1900

def initialize(source_configuration:, guardrail_configuration: nil)
  @source_configuration = source_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlowVersion::PromptFlowNodeSourceConfigurationProperty.new(**source_configuration.transform_keys(&:to_sym)) : source_configuration
  Jsii::Type.check_type(@source_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3dWZXJzaW9uLlByb21wdEZsb3dOb2RlU291cmNlQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "sourceConfiguration")
  @guardrail_configuration = guardrail_configuration.is_a?(Hash) ? ::AWSCDK::Bedrock::CfnFlowVersion::GuardrailConfigurationProperty.new(**guardrail_configuration.transform_keys(&:to_sym)) : guardrail_configuration
  Jsii::Type.check_type(@guardrail_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrLkNmbkZsb3dWZXJzaW9uLkd1YXJkcmFpbENvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "guardrailConfiguration") unless @guardrail_configuration.nil?
end

Instance Attribute Details

#guardrail_configurationAWSCDK::IResolvable, ... (readonly)

Contains configurations for a guardrail to apply to the prompt in this node and the response generated from it.



1916
1917
1918
# File 'bedrock/cfn_flow_version.rb', line 1916

def guardrail_configuration
  @guardrail_configuration
end

Class Method Details

.jsii_propertiesObject



1918
1919
1920
1921
1922
1923
# File 'bedrock/cfn_flow_version.rb', line 1918

def self.jsii_properties
  {
    :source_configuration => "sourceConfiguration",
    :guardrail_configuration => "guardrailConfiguration",
  }
end

Instance Method Details

#to_jsiiObject



1925
1926
1927
1928
1929
1930
1931
1932
# File 'bedrock/cfn_flow_version.rb', line 1925

def to_jsii
  result = {}
  result.merge!({
    "sourceConfiguration" => @source_configuration,
    "guardrailConfiguration" => @guardrail_configuration,
  })
  result.compact
end