@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ParsingConfiguration extends Object implements Serializable, Cloneable, StructuredPojo
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.
To use a model to parse PDF documents, set the parsing strategy to BEDROCK_FOUNDATION_MODEL
and specify
the model to use by ARN. You can also override the default parsing prompt with instructions for how to interpret
images and tables in your documents. The following models are supported.
Anthropic Claude 3 Sonnet - anthropic.claude-3-sonnet-20240229-v1:0
Anthropic Claude 3 Haiku - anthropic.claude-3-haiku-20240307-v1:0
You can get the ARN of a model with the action. Standard model usage charges apply for the foundation model parsing strategy.
Constructor and Description |
---|
ParsingConfiguration() |
Modifier and Type | Method and Description |
---|---|
ParsingConfiguration |
clone() |
boolean |
equals(Object obj) |
BedrockFoundationModelConfiguration |
getBedrockFoundationModelConfiguration()
Settings for a foundation model used to parse documents for a data source.
|
String |
getParsingStrategy()
The parsing strategy for the data source.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setBedrockFoundationModelConfiguration(BedrockFoundationModelConfiguration bedrockFoundationModelConfiguration)
Settings for a foundation model used to parse documents for a data source.
|
void |
setParsingStrategy(String parsingStrategy)
The parsing strategy for the data source.
|
String |
toString()
Returns a string representation of this object.
|
ParsingConfiguration |
withBedrockFoundationModelConfiguration(BedrockFoundationModelConfiguration bedrockFoundationModelConfiguration)
Settings for a foundation model used to parse documents for a data source.
|
ParsingConfiguration |
withParsingStrategy(ParsingStrategy parsingStrategy)
The parsing strategy for the data source.
|
ParsingConfiguration |
withParsingStrategy(String parsingStrategy)
The parsing strategy for the data source.
|
public void setBedrockFoundationModelConfiguration(BedrockFoundationModelConfiguration bedrockFoundationModelConfiguration)
Settings for a foundation model used to parse documents for a data source.
bedrockFoundationModelConfiguration
- Settings for a foundation model used to parse documents for a data source.public BedrockFoundationModelConfiguration getBedrockFoundationModelConfiguration()
Settings for a foundation model used to parse documents for a data source.
public ParsingConfiguration withBedrockFoundationModelConfiguration(BedrockFoundationModelConfiguration bedrockFoundationModelConfiguration)
Settings for a foundation model used to parse documents for a data source.
bedrockFoundationModelConfiguration
- Settings for a foundation model used to parse documents for a data source.public void setParsingStrategy(String parsingStrategy)
The parsing strategy for the data source.
parsingStrategy
- The parsing strategy for the data source.ParsingStrategy
public String getParsingStrategy()
The parsing strategy for the data source.
ParsingStrategy
public ParsingConfiguration withParsingStrategy(String parsingStrategy)
The parsing strategy for the data source.
parsingStrategy
- The parsing strategy for the data source.ParsingStrategy
public ParsingConfiguration withParsingStrategy(ParsingStrategy parsingStrategy)
The parsing strategy for the data source.
parsingStrategy
- The parsing strategy for the data source.ParsingStrategy
public String toString()
toString
in class Object
Object.toString()
public ParsingConfiguration clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.