Package org.springframework.ai.document
Class DefaultContentFormatter
java.lang.Object
org.springframework.ai.document.DefaultContentFormatter
- All Implemented Interfaces:
ContentFormatter
Default implementation of
ContentFormatter
.- Author:
- Christian Tzolov
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
Start building a new configuration.static DefaultContentFormatter
Returns the default config.format
(Document document, MetadataMode metadataMode) metadataFilter
(Map<String, Object> metadata, MetadataMode metadataMode) Filters the metadata by the configured MetadataMode.
-
Method Details
-
builder
Start building a new configuration.- Returns:
- The entry point for creating a new configuration.
-
defaultConfig
Returns the default config.- Returns:
- the default config
-
format
- Specified by:
format
in interfaceContentFormatter
-
metadataFilter
Filters the metadata by the configured MetadataMode.- Parameters:
metadata
- Document metadata.- Returns:
- Returns the filtered by configured mode metadata.
-
getMetadataTemplate
-
getMetadataSeparator
-
getTextTemplate
-
getExcludedInferenceMetadataKeys
-
getExcludedEmbedMetadataKeys
-