Class: AWSCDK::Bedrock::CfnFlowVersion::KnowledgeBasePromptTemplateProperty

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

Overview

Defines a custom prompt template for orchestrating the retrieval and generation process.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text_prompt_template:) ⇒ KnowledgeBasePromptTemplateProperty

Returns a new instance of KnowledgeBasePromptTemplateProperty.

Parameters:

  • text_prompt_template (String)

    The text of the prompt template.



1614
1615
1616
1617
# File 'bedrock/cfn_flow_version.rb', line 1614

def initialize(text_prompt_template:)
  @text_prompt_template = text_prompt_template
  Jsii::Type.check_type(@text_prompt_template, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "textPromptTemplate")
end

Instance Attribute Details

#text_prompt_templateString (readonly)

The text of the prompt template.



1623
1624
1625
# File 'bedrock/cfn_flow_version.rb', line 1623

def text_prompt_template
  @text_prompt_template
end

Class Method Details

.jsii_propertiesObject



1625
1626
1627
1628
1629
# File 'bedrock/cfn_flow_version.rb', line 1625

def self.jsii_properties
  {
    :text_prompt_template => "textPromptTemplate",
  }
end

Instance Method Details

#to_jsiiObject



1631
1632
1633
1634
1635
1636
1637
# File 'bedrock/cfn_flow_version.rb', line 1631

def to_jsii
  result = {}
  result.merge!({
    "textPromptTemplate" => @text_prompt_template,
  })
  result.compact
end