ParsingConfigurationProperty Struct
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.
Example
ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wisdom as wisdom } from 'aws-cdk-lib';
const parsingConfigurationProperty: wisdom.CfnKnowledgeBase.ParsingConfigurationProperty = {
parsingStrategy: 'parsingStrategy',
// the properties below are optional
bedrockFoundationModelConfiguration: {
modelArn: 'modelArn',
// the properties below are optional
parsingPrompt: {
parsingPromptText: 'parsingPromptText',
},
},
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_wisdom as wisdom
parsing_configuration_property = wisdom.CfnKnowledgeBase.ParsingConfigurationProperty(
parsing_strategy="parsingStrategy",
# the properties below are optional
bedrock_foundation_model_configuration=wisdom.CfnKnowledgeBase.BedrockFoundationModelConfigurationProperty(
model_arn="modelArn",
# the properties below are optional
parsing_prompt=wisdom.CfnKnowledgeBase.ParsingPromptProperty(
parsing_prompt_text="parsingPromptText"
)
)
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wisdom.*;
ParsingConfigurationProperty parsingConfigurationProperty = ParsingConfigurationProperty.builder()
.parsingStrategy("parsingStrategy")
// the properties below are optional
.bedrockFoundationModelConfiguration(BedrockFoundationModelConfigurationProperty.builder()
.modelArn("modelArn")
// the properties below are optional
.parsingPrompt(ParsingPromptProperty.builder()
.parsingPromptText("parsingPromptText")
.build())
.build())
.build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.Wisdom;
var parsingConfigurationProperty = new ParsingConfigurationProperty {
ParsingStrategy = "parsingStrategy",
// the properties below are optional
BedrockFoundationModelConfiguration = new BedrockFoundationModelConfigurationProperty {
ModelArn = "modelArn",
// the properties below are optional
ParsingPrompt = new ParsingPromptProperty {
ParsingPromptText = "parsingPromptText"
}
}
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"
parsingConfigurationProperty := &ParsingConfigurationProperty{
ParsingStrategy: jsii.String("parsingStrategy"),
// the properties below are optional
BedrockFoundationModelConfiguration: &BedrockFoundationModelConfigurationProperty{
ModelArn: jsii.String("modelArn"),
// the properties below are optional
ParsingPrompt: &ParsingPromptProperty{
ParsingPromptText: jsii.String("parsingPromptText"),
},
},
}
Properties
bedrockFoundationModelConfigurationoptionalIResolvable | CfnKnowledgeBase.BedrockFoundationModelConfigurationPropertybedrock_foundation_model_configurationoptionaltyping.Union[IResolvable, BedrockFoundationModelConfigurationProperty]bedrockFoundationModelConfigurationoptionalIResolvableBedrockFoundationModelConfigurationoptionalIResolvableBedrockFoundationModelConfigurationoptionalinterface{}#Settings for a foundation model used to parse documents for a data source.
parsingStrategystringparsing_strategystrparsingStrategyStringParsingStrategystringParsingStrategy*stringrequired#The parsing strategy for the data source.