Class: AWSCDK::Wisdom::CfnKnowledgeBase::ParsingConfigurationProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::Wisdom::CfnKnowledgeBase::ParsingConfigurationProperty
- Defined in:
- wisdom/cfn_knowledge_base.rb
Overview
Settings for parsing document contents.
By default, the service converts the contents of each document into text before splitting it into chunks. To improve processing of PDF files with tables and images, you can configure the data source to convert the pages of text into images and use a model to describe the contents of each page.
Instance Attribute Summary collapse
-
#bedrock_foundation_model_configuration ⇒ AWSCDK::IResolvable, ...
readonly
Settings for a foundation model used to parse documents for a data source.
-
#parsing_strategy ⇒ String
readonly
The parsing strategy for the data source.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(parsing_strategy:, bedrock_foundation_model_configuration: nil) ⇒ ParsingConfigurationProperty
constructor
A new instance of ParsingConfigurationProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(parsing_strategy:, bedrock_foundation_model_configuration: nil) ⇒ ParsingConfigurationProperty
Returns a new instance of ParsingConfigurationProperty.
1013 1014 1015 1016 1017 1018 |
# File 'wisdom/cfn_knowledge_base.rb', line 1013 def initialize(parsing_strategy:, bedrock_foundation_model_configuration: nil) @parsing_strategy = parsing_strategy Jsii::Type.check_type(@parsing_strategy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "parsingStrategy") @bedrock_foundation_model_configuration = bedrock_foundation_model_configuration.is_a?(Hash) ? ::AWSCDK::Wisdom::CfnKnowledgeBase::BedrockFoundationModelConfigurationProperty.new(**bedrock_foundation_model_configuration.transform_keys(&:to_sym)) : bedrock_foundation_model_configuration Jsii::Type.check_type(@bedrock_foundation_model_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c193aXNkb20uQ2ZuS25vd2xlZGdlQmFzZS5CZWRyb2NrRm91bmRhdGlvbk1vZGVsQ29uZmlndXJhdGlvblByb3BlcnR5In1dfX0=")), "bedrockFoundationModelConfiguration") unless @bedrock_foundation_model_configuration.nil? end |
Instance Attribute Details
#bedrock_foundation_model_configuration ⇒ AWSCDK::IResolvable, ... (readonly)
Settings for a foundation model used to parse documents for a data source.
1029 1030 1031 |
# File 'wisdom/cfn_knowledge_base.rb', line 1029 def bedrock_foundation_model_configuration @bedrock_foundation_model_configuration end |
#parsing_strategy ⇒ String (readonly)
The parsing strategy for the data source.
1024 1025 1026 |
# File 'wisdom/cfn_knowledge_base.rb', line 1024 def parsing_strategy @parsing_strategy end |
Class Method Details
.jsii_properties ⇒ Object
1031 1032 1033 1034 1035 1036 |
# File 'wisdom/cfn_knowledge_base.rb', line 1031 def self.jsii_properties { :parsing_strategy => "parsingStrategy", :bedrock_foundation_model_configuration => "bedrockFoundationModelConfiguration", } end |
Instance Method Details
#to_jsii ⇒ Object
1038 1039 1040 1041 1042 1043 1044 1045 |
# File 'wisdom/cfn_knowledge_base.rb', line 1038 def to_jsii result = {} result.merge!({ "parsingStrategy" => @parsing_strategy, "bedrockFoundationModelConfiguration" => @bedrock_foundation_model_configuration, }) result.compact end |