Package ai.extend.types
Class ParseConfig
- java.lang.Object
-
- ai.extend.types.ParseConfig
-
public final class ParseConfig extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParseConfig.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ParseConfig.Builderbuilder()booleanequals(java.lang.Object other)java.util.Map<java.lang.String,java.lang.Object>getAdditionalProperties()java.util.Optional<ParseConfigAdvancedOptions>getAdvancedOptions()java.util.Optional<ParseConfigBlockOptions>getBlockOptions()java.util.Optional<ParseConfigChunkingStrategy>getChunkingStrategy()java.util.Optional<ParseConfigEngine>getEngine()java.util.Optional<ParseConfigTarget>getTarget()inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getTarget
public java.util.Optional<ParseConfigTarget> getTarget()
- Returns:
- The target format for the parsed content.
Supported values:
markdown: True markdown with logical reading order (headings, lists, tables, checkboxes). Best default for LLMs/RAG and enables section-based chunking.spatial: Layout/position-preserving text that uses markdown elements for block types but is not strictly markdown due to whitespace/tabs used to maintain placement. Only page-based chunking is supported.
Guidance:
- Prefer
markdownfor most documents, multi-column reading order, and retrieval use cases - Prefer
spatialfor messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs
See “Markdown vs Spatial” in the Parse guide for details.
-
getChunkingStrategy
public java.util.Optional<ParseConfigChunkingStrategy> getChunkingStrategy()
- Returns:
- Strategy for dividing the document into chunks.
-
getEngine
public java.util.Optional<ParseConfigEngine> getEngine()
- Returns:
- The parsing engine to use. Supported values:
parse_performance: Full-featured parsing engine with highest accuracy (default)parse_light: Lightweight parsing engine optimized for speed. This does not have robust layout support and does not support markdown layout target.
-
getBlockOptions
public java.util.Optional<ParseConfigBlockOptions> getBlockOptions()
- Returns:
- Options for controlling how different block types are processed.
-
getAdvancedOptions
public java.util.Optional<ParseConfigAdvancedOptions> getAdvancedOptions()
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
getAdditionalProperties
public java.util.Map<java.lang.String,java.lang.Object> getAdditionalProperties()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static ParseConfig.Builder builder()
-
-